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: Henri Sivonen <hsivonen@iki.fi>
Date: Wed, 2 Feb 2011 15:48:02 +0200
Message-ID: <0E2EAA80-F15C-4917-B2CB-1EE37806925A@iki.fi>
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

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/
Received on Wednesday, 2 February 2011 05:48:02 UTC

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