I have a GWT generated JS code that is injected to the page after the DOMReady event. I use the xsiframe linker.
After some research I discovered that the linker does listen to the DOMReady event but check for load state as fallback.
These are the relevant files:
So logically, we wait for the DOMready by listeneing in waitForBodyLoaded.js:
$doc.addEventListener("DOMContentLoaded", onBodyDone, false);
but we wait for the loaded state in isBodyLoaded.js:
return (/loaded|complete/.test($doc.readyState));
I can simply override the linker and replace the isBodyLoaded, but i was wondering if there is a reason why there is no "interactive" in the regex like so:
return (/loaded|complete|interactive/.test($doc.readyState));
or maybe this use case was just missed?!