I can detect when the content of an iframe has loaded using the load event. Unfortunately, for my purposes, there are two problems with this:
Is there some way I can reliably determine if either of the above errors occurred?
I'm writing a semi-web semi-desktop application based on Mozilla/XULRunner, so solutions that only work in Mozilla are welcome.
If you have control over the iframe page (and the pages are on the same domain name), a strategy could be as follows:
var iFrameLoaded = false;
true
calling from the iframe document a parent's function (setIFrameLoaded();
for example).iFrameLoaded
flag using the timer
object (set the timer to your preferred timeout limit) - if the flag is still false you can tell that the iframe was not regularly loaded.I hope this helps.