]> git.r.bdr.sh - rbdr/r.bdr.sh/blame - jekyll/js/vendor/neon/stdlib/bubbling_support.js
Fixes button size and colors
[rbdr/r.bdr.sh] / jekyll / js / vendor / neon / stdlib / bubbling_support.js
CommitLineData
0982546d
BB
1Module('BubblingSupport')({
2 dispatch : function (type, data) {
3 data = data || {};
4 var event = CustomEventSupport.prototype.dispatch.call(this, type, data);
5 if (event.isPropagationStopped === false) {
6 if (this.parent && this.parent.dispatch) {
7 data.target = event.target;
8 data.currentTarget = this.parent;
9 this.parent.dispatch(event.type, data);
10 }
11 }
12 return event;
13 },
14
15 prototype : {
16 dispatch : function (type, data) {
17 data = data || {};
18
19 var event = CustomEventSupport.prototype.dispatch.call(this, type, data);
20
21 if (event.isPropagationStopped === false && event.bubbles === true) {
22 if (this.parent && this.parent.dispatch) {
23 data.target = event.target;
24 data.currentTarget = this.parent;
25 this.parent.dispatch(event.type, data);
26 }
27 }
28
29 return event;
30 }
31 }
32 });