event.js 522 B

1234567891011121314151617181920212223
  1. "use strict";
  2. function Event(type, bubbles, cancelable, target) {
  3. this.initEvent(type, bubbles, cancelable, target);
  4. }
  5. Event.prototype = {
  6. initEvent: function (type, bubbles, cancelable, target) {
  7. this.type = type;
  8. this.bubbles = bubbles;
  9. this.cancelable = cancelable;
  10. this.target = target;
  11. this.currentTarget = target;
  12. },
  13. stopPropagation: function () {},
  14. preventDefault: function () {
  15. this.defaultPrevented = true;
  16. }
  17. };
  18. module.exports = Event;