[whatwg] Link.onload; defer on style, depends
ian at hixie.ch
Tue Apr 28 00:32:44 PDT 2009
On Tue, 28 Apr 2009, Boris Zbarsky wrote:
> The testcase I was thinking of is:
> <body onload="3">
> <img onload="1; image = new Image(); image.src = 'test'; image.onload = 2"
> <img src="bar">
> In Gecko, on this testcase, the handlers always run in the order 1, 2, 3.
Ah, yes. good point. I can require that relatively simply (just have the
tasks that are queued for 'load' events themselves delay the page's load
event), should I? It seems like you can still get into weird conditions,
like what if you have this situation:
<img src=a onload="setTimeout(f, 100)">
If f() creates a new Image object, the order in which the events fire will
depend on whether the timeout fires before or after b's onload fires.
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg