Created
February 17, 2016 04:53
-
-
Save TravisMullen/f7272e7a19ae34bdef34 to your computer and use it in GitHub Desktop.
jQuery-less Wait for DOM Complete
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
var waitForDocument = setInterval(function() { | |
if (document.readyState !== 'complete') return; | |
// or var WIN = window.open(); | |
// if (WIN.document.readyState !== 'complete') return; | |
// if (WIN.opener.document.readyState !== 'complete') return; | |
clearInterval(waitForDocument); | |
// do your work | |
}, 100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment