On Mon, 30 Jul 2012, James Graham wrote:
There seems to be general agreement (amongst browsers, not yet the spec)
that if a document does something that causes a new load event from
within an onload handler (document.open/document.close) the second load
event is not dispatched. This also
For what it's worth, I think the weirdness described in this thread is
a good reason not to try to make DOMContentLoaded consistent with the
load event for the sake of consistency. For one thing, the code that
manages the weirdness of the load event lives in a different place
compared to the code
On 7/30/12 12:02 PM, James Graham wrote:
If desired, I can try to figure out exactly why there's only one load
event on the first iframe there. Let me know.
That would be really helpful.
OK, I looked into this. There are two things going on:
1) Gecko fires the load event on the iframe as
There seems to be general agreement (amongst browsers, not yet the spec)
that if a document does something that causes a new load event from
within an onload handler (document.open/document.close_ the second load
event is not dispatched. This also applies to the load event on iframe
elements
On 7/30/12 11:10 AM, James Graham wrote:
I don't think I have a strong opinion about what should happen here, but
the Gecko behaviour could be easier to implement, and the WebKit
behaviour slightly safer (presumably the point of this anomaly is to
prevent infinite loops in load event handers).
On 07/30/2012 05:44 PM, Boris Zbarsky wrote:
On 7/30/12 11:10 AM, James Graham wrote:
I don't think I have a strong opinion about what should happen here, but
the Gecko behaviour could be easier to implement, and the WebKit
behaviour slightly safer (presumably the point of this anomaly is to