[Webkit-unassigned] [Bug 33604] iframe.contentWindow doesn't fire DOMContentLoaded (implement DOMFrameContentLoaded?)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 13 16:55:22 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=33604


arno. <arno at renevier.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arno at renevier.net




--- Comment #4 from arno. <arno at renevier.net>  2012-08-13 16:55:51 PST ---
Currently, there is no way to known when a frame dom has finished loaded.
We could try to add a DOMContentLoaded listener to the iframe contentDocument.
But when frame has just been created, contentDocument is an about:blank document.

<iframe src="iframe.html"></iframe>
<script>
var iframe = document.getElementById('iframe');
var doc = iframe.contentDocument; // about:blank document
</script>

When we try to access contentDocument later, document may (or may not) have
been replaced by loaded document, and we have no way on nothing when it will be
replaced.

By searching on google, I discovered that some people call setTimeout
repetitively until document.readyState is loaded or complete. The alternative
is to use load event, but if there are a lot of external resources, there may
be some delay between the document readyness, and the load event.

So, it may be nice to have DOMFrameContentLoaded event, which is already
implemented in Firefox and in Opera.
~

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list