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.

22 lines
477 B

4 years ago
  1. 'use strict';
  2. function Event(eventType) {
  3. this.type = eventType;
  4. }
  5. Event.prototype.initEvent = function(eventType, canBubble, cancelable) {
  6. this.type = eventType;
  7. this.bubbles = canBubble;
  8. this.cancelable = cancelable;
  9. this.timeStamp = +new Date();
  10. return this;
  11. };
  12. Event.prototype.stopPropagation = function() {};
  13. Event.prototype.preventDefault = function() {};
  14. Event.CAPTURING_PHASE = 1;
  15. Event.AT_TARGET = 2;
  16. Event.BUBBLING_PHASE = 3;
  17. module.exports = Event;