Skip to content

Instantly share code, notes, and snippets.

@XOP
Created August 28, 2015 10:56
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 XOP/80e4cea32a49fe6af0ce to your computer and use it in GitHub Desktop.
Save XOP/80e4cea32a49fe6af0ce to your computer and use it in GitHub Desktop.
/**
* From
* http://davidwalsh.name/document-readystate
*/
// The basic check
if(document.readyState === 'complete') {
// good to go!
}
// Polling for the sake of my intern tests
var interval = setInterval(function() {
if(document.readyState === 'complete') {
clearInterval(interval);
done();
}
}, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment