Created
June 29, 2021 00:14
-
-
Save c7x43t/be5dada7a0e13fec0f489c1830dabb3f 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 loadScript(script,...args){ | |
if (document.readyState === 'complete' || document.readyState === 'interactive') { | |
script(...args); | |
}else{ | |
document.addEventListener('DOMContentLoaded',script.bind(this,...args)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment