[whatwg] external SCRIPT removal; Setting "parser inserted" to false
dhtmlkitchen at gmail.com
Wed Nov 17 22:04:28 PST 2010
In "[whatwg] Removal of blocking script", the question came up of
whether or not a removed, but not already started script is to be
Answering that question is fairly important with dynamic script
insertion, where aborting a request that has taken to long and trying
again would make sense. This would be used when a request failed (due
to unstable user's Internet connection, for example). Retrying that
request would be done by adding the script to the document again, but
first the original request should be aborted.
In at least one version of Opera removal of a "parser inserted" script
element of an external script that is not "already started" would
cause the script to not be evaluated; so effectively aborting it.
Useful but not interoperable.
Perhaps a better question to ask is not "does the browser
synchronously run the script element," but instead: "Does script
removal cause the 'parser inserted' flag be set to false?"
HTML 5 should specify what happens when a script is removed from the DOM.
More information about the whatwg