-
-
Save DJTB/3ff4b54384c16cb2fecc to your computer and use it in GitHub Desktop.
Inspired by jQuery, an inline function to solve forever any problem related to DOMContentLoaded (with or without defer)
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(r,e,a,d,y){function $(f){d?f():r.push(f)}e.ready=$;e.addEventListener(a,y=function(){d=!e.removeEventListener(a,y,d);while(y=r.shift())y()},d)}([],document,'DOMContentLoaded',!1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment