Short of setting a variable inside of window.onload
, is there a way to detect if the page has finished loading?
I'm injecting a bit of third party JS in a page that may or may not be fully loaded. I can't modify the page. I can't use JQuery.
I can add a function and poll it repeatedly until it returns true (page fully loaded). Any ideas?