Closed andrewscode closed 9 years ago
Yes. I think this should be
window.addEventListener(...);
document.addEventListener(...);
Thanks Andrew. Feel free to open a pull request for this.
Yes, not sure where that globalDocument reference came from.
Would be global and global.document in My Library as it doesn't reference the window object. I like having the document reference tied to the global reference as it easier to automate frames, run outside of browsers (e.g. on NodeJS), etc.
I just noticed one other thing, the comments regarding adding the following:
<script type="text/javascript">
if ('function' == typeof readyListener) {
window.setTimeout(readyListener, 1);
}
</script>
However, readyListener isn't in the global scope, so this will never be called.
The readyListener variable should be in the global scope for this purpose. If not, needs to be fixed.
The 2nd rendition of deferUntilReady depends on the globalDocument variable
However, a build of jessie will nullify the globalDocument at the end of a build
So when deferUntilReady is called, an error occurs.
Should the deferUntilReady simply call
?