Skip to content

Instantly share code, notes, and snippets.

@ryedin
Created November 9, 2010 00:59
Show Gist options
  • Save ryedin/668553 to your computer and use it in GitHub Desktop.
Save ryedin/668553 to your computer and use it in GitHub Desktop.
pseudocode!!!
var emitter1 = new EventEmitter();
var emitter2 = new EventEmitter();
var _emit = emitter1.emit;
emitter1.emit = function() {
//piggyback
emitter2.emit.call(emitter2, arguments);
//original impl.
_emit.call(this, arguments);
};
@ryedin
Copy link
Author

ryedin commented Nov 9, 2010

pseudocode!!!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment