-
-
Save rafagarcia/4159877 to your computer and use it in GitHub Desktop.
Tiny Cross-browser DOM ready function (120 bytes)
This file contains hidden or 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
// @param {function} f The function to execute when DOM is ready | |
function a(f,o,m){o=document,m='addEventListener';o[m]?o[m]('DOMContentLoaded',f):(o=window,o.attachEvent('onload',f));} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment