W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > September 2011

[Bug 13965] Exposing onreadystatechange on script elements seems to not be web-compatible unless they fire the event

From: <bugzilla@jessica.w3.org>
Date: Wed, 07 Sep 2011 20:10:02 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1R1ORe-0001dd-PS@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=13965

--- Comment #22 from Ian 'Hixie' Hickson <ian@hixie.ch> 2011-09-07 20:10:01 UTC ---
Having studied this further, I propose to only fire the readystatechange event
in the following situations:

 - when the prefetch has succeeded for an external script, if the script is not
already being executed
 - when the prefetch has been abandoned, if the script is not already being
executed (doesn't apply to any existing browser)
 - when 'error' is about to be fired (state will be 'complete')
 - when 'load' is about to be fired (state will be 'complete')

IE fires it in a couple of other cases (e.g. it fires it for the transition to
'loading' if the load hasn't started by the time the author tries to execute
the script) but that just seems to make it noisy; I don't see a use case for
exposing those transitions. It never seems to fire it for 'interactive'. It
seems to use 'loaded' for uncached network loads and 'complete' for inline
scripts (and according to bz, cached loads; I haven't tested it).

IE's behaviour if the src="" is something bogus like "foo:" or if it is
something with special behaviour like "javascript:" is quite weird (the element
can regress up the chain of states when the element is inserted into the
document, for instance). I intend to drop all of that weird behaviour.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Wednesday, 7 September 2011 20:10:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:02:03 UTC