W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2009

[whatwg] Asynchronous events observe unexpected states in media elements

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 09 Apr 2009 21:54:51 -0400
Message-ID: <49DEA6EB.8000301@mit.edu>
Robert O'Callahan wrote:
> A related surprise is that although a media element delays the document 
> load event until the readyState reaches HAVE_CURRENT_DATA, it is 
> possible for a loadeddata event handler to actually run after the 
> document load event handler.

For what it's worth, there are similar situations elsewhere.  For 
example, the currently proposed spec for stylesheet load events says 
those fire asynchronously, so it looks to me like they could fire after 
onload.

The only place in Gecko where we currently fire asynchronous load-like 
events is for HTML <img>; we make sure to fire the page's onload after 
all image onloads, even though the image onloads fire async from image 
load completion.

Perhaps this should be a general rule for load events of various sorts.

This doesn't help your other issues, of course.

-Boris
Received on Thursday, 9 April 2009 18:54:51 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:11 UTC