Skip to content

Instantly share code, notes, and snippets.

@tilomitra
Forked from lsmith/gist:4272500
Created January 16, 2013 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tilomitra/4548628 to your computer and use it in GitHub Desktop.
Save tilomitra/4548628 to your computer and use it in GitHub Desktop.
notifier.handle.evt.fire = function (e) {
var subs = this._subscribers.concat(this._afters),
args = Y.Array(arguments, 0, true),
i, len, halt;
for (i = 0, len = subs.length; i < len; ++i) {
halt = subs[i].notify(args, this);
// stopImmediatePropagation
if (halt === false || e.stopped > 1) {
break;
}
}
if (e.prevented || e.stopped) {
e.target.once('click', function (clickEvt) {
e.prevented && clickEvt.preventDefault();
e.stopped && clickEvt[e.stopped === 2 ? 'stopImmediatePropagation' : 'stopPropagation']();
})
}
return !!this.stopped;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment