Created
June 25, 2018 10:15
-
-
Save mafintosh/b9f5bddde2d2be7af365aaae9cc47e46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function injectEvent (e, name, fn) { | |
if (!e._events[name]) e._events[name] = [] | |
e._events[name].push(fn) | |
e._eventsCount++ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment