You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
505 B

4 years ago
  1. var Event = function(eventType, options) {
  2. this.type = eventType;
  3. for (var key in options)
  4. this[key] = options[key];
  5. };
  6. Event.prototype.initEvent = function(eventType, canBubble, cancelable) {
  7. this.type = eventType;
  8. this.bubbles = canBubble;
  9. this.cancelable = cancelable;
  10. };
  11. Event.prototype.stopPropagation = function() {};
  12. Event.prototype.preventDefault = function() {};
  13. Event.CAPTURING_PHASE = 1;
  14. Event.AT_TARGET = 2;
  15. Event.BUBBLING_PHASE = 3;
  16. module.exports = Event;