Created
June 23, 2015 08:43
-
-
Save RayPS/3b95eecc6f5832249006 to your computer and use it in GitHub Desktop.
bling.coffee
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
window.$ = document.querySelectorAll.bind(document) | |
Node::on = window.on = (name, fn) -> | |
@addEventListener name, fn | |
return | |
NodeList::__proto__ = Array.prototype | |
NodeList::on = NodeList::addEventListener = (name, fn) -> | |
@forEach (elem, i) -> | |
elem.on name, fn | |
return | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment