W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2011

[whatwg] The choice of script global object to use when the script element is moved

From: Adam Barth <w3c@adambarth.com>
Date: Sat, 26 Feb 2011 13:09:19 -0800
Message-ID: <AANLkTimsvPFk0msKx+BUMYJPLhsa8Tx=WgDr-s5peGp-@mail.gmail.com>
On Wed, Feb 2, 2011 at 5:48 AM, Henri Sivonen <hsivonen at iki.fi> wrote:
> On Feb 2, 2011, at 03:07, Ian Hickson wrote:
>> I suppose we could make it so that scripts get neutered when the document
>> that they were first associated with gets unloaded. Would that work?
> We did something different.
>> Proposal #1:
> Proposal #4 (what Gecko now does):
> ?* If at the time when the parser triggers the 'run' algorithm, the owner document of the script is not the same document whose active parser the parser is, set the 'already executed' flag and abort the steps.
> ?* If at the time of a script becoming available for evaluation the owner document of the script is not the same document that was the owner document at the time of the 'run' algorithm, don't evaluate the script.
> See https://bugzilla.mozilla.org/show_bug.cgi?id=592366

Sorry for the delayed response.  I don't recall off-hand what the spec
currently says, but any of these options sound fine.  Of (1), (2), and
(4), I have a slight preference for (4) because then we don't need to
notify all the script elements when a document gets unloaded.

Received on Saturday, 26 February 2011 13:09:19 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:31 UTC