Skip to content

Instantly share code, notes, and snippets.

@Artisan-Asad
Created April 3, 2020 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Artisan-Asad/586b27995ae89a5c09c1ad8fb2b7bfcd to your computer and use it in GitHub Desktop.
Save Artisan-Asad/586b27995ae89a5c09c1ad8fb2b7bfcd to your computer and use it in GitHub Desktop.
const DocumentReady = (e) => {
if (document.readyState === "complete" || document.readyState === "interactive") {
setTimeout(e, 1);
} else {
document.addEventListener("DOMContentLoaded", e);
}
}
DocumentReady( () => {
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment