github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/themes/wind/static/libs/sockjs-client-1.1.0/lib/event/event.js (about) 1 'use strict'; 2 3 function Event(eventType) { 4 this.type = eventType; 5 } 6 7 Event.prototype.initEvent = function(eventType, canBubble, cancelable) { 8 this.type = eventType; 9 this.bubbles = canBubble; 10 this.cancelable = cancelable; 11 this.timeStamp = +new Date(); 12 return this; 13 }; 14 15 Event.prototype.stopPropagation = function() {}; 16 Event.prototype.preventDefault = function() {}; 17 18 Event.CAPTURING_PHASE = 1; 19 Event.AT_TARGET = 2; 20 Event.BUBBLING_PHASE = 3; 21 22 module.exports = Event;