[whatwg] external SCRIPT removal; Setting "parser inserted" to false

In "[whatwg] Removal of blocking script"[1], the question came up of
whether or not a removed, but not already started script is to be
evaluated.

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.
-- 
Garrett
[1] http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-November/029039.html

Received on Wednesday, 17 November 2010 22:04:28 UTC