Last change
on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
477 bytes
|
Line | |
---|
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;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.