[whatwg] readystatechange for SCRIPT

>> Since nobody seems to object, I'm going to revert r6543 and make
>> onreadystatechange special.

"Since nobody seems to object"? You had this thread active with this 
suggestion for less than a day, and that's long enough to conclude that 
noone objects? Man, am I sorry I was away from my email yesterday. Sheesh.

So, can I clarify something? You have moved `onreadystatechange` and 
`readyState` off of the <script> element entirely, and onto the HTML 
element? If we have multiple scripts loading at the same time, how do you 
get notified of the different states of each script element, when there's 
only one property and one event handler?

------------------

In regards to all the concern about double-firing of load detection logic, 
IE9 added both `onload` event firing to their existing script element's 
`onreadystatechange` firing. That's been around now for 6 months (not to 
mention the year long platform-preview stage where content was tested in IE9 
relentlessly).

AFAIK, there've been no major compat problems with that. Why? Because most 
script loaders were already aware of a case (in Opera) where the load 
handler might be fired twice, and so were already doing the filtering with 
the "loaded" flag. LABjs has done exactly that for over 2 years now, as have 
almost all other script loaders since. This is hardly something new.

So, I'm not sure why we're rushing to fear these problems. A few years ago, 
maybe this was an issue, but I don't see how there's real evidence of 
current problems. Most script loaders are already immune to this problem.

--Kyle


 

Received on Saturday, 10 September 2011 08:00:54 UTC