]> git.r.bdr.sh - rbdr/r.bdr.sh/blame - jekyll/js/vendor/neon/stdlib/custom_event.js
Remove melty cheese
[rbdr/r.bdr.sh] / jekyll / js / vendor / neon / stdlib / custom_event.js
CommitLineData
0982546d
BB
1Class('CustomEvent')({
2 prototype : {
3 bubbles : true,
4 cancelable : true,
5 currentTarget : null,
6 timeStamp : 0,
7 target : null,
8 type : '',
9 isPropagationStopped : false,
10 isDefaultPrevented : false,
11 isImmediatePropagationStopped : false,
12 areImmediateHandlersPrevented : false,
13 init : function init(type, data) {
14 this.type = type;
15 if (typeof data !== 'undefined') {
16 for(var property in data) {
17 if (data.hasOwnProperty(property)) {
18 this[property] = data[property];
19 }
20 }
21 }
22 },
23 stopPropagation : function stopPropagation() {
24 this.isPropagationStopped = true;
25 },
26 preventDefault : function preventDefault() {
27 this.isDefaultPrevented = true;
28 },
29 stopImmediatePropagation : function stopImmediatePropagation() {
30 this.preventImmediateHandlers();
31 this.stopPropagation();
32 },
33 preventImmediateHandlers : function preventImmediateHandlers() {
34 this.areImmediateHandlersPrevented = true;
35 }
36 }
37});