Skip to content

Instantly share code, notes, and snippets.

@mafintosh
Created June 25, 2018 10:15
Show Gist options
  • Save mafintosh/b9f5bddde2d2be7af365aaae9cc47e46 to your computer and use it in GitHub Desktop.
Save mafintosh/b9f5bddde2d2be7af365aaae9cc47e46 to your computer and use it in GitHub Desktop.
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