W3C home > Mailing lists > Public > public-html@w3.org > January 2009

Re: cloneNode() and script execution

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 19 Jan 2009 10:29:05 -0800
Message-ID: <63df84f0901191029w115cc1c4yf7b01ab283786090@mail.gmail.com>
To: "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: "Hallvord R. M. Steen" <hallvord@opera.com>, public-html@w3.org

On Mon, Jan 19, 2009 at 6:31 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> Hallvord R. M. Steen wrote:
>>> So I don't see how "because it doesn't clone the script node" can
>>> possibly be supported by the spec text here.
>> You actually misquoted me slightly - I wrote "script code", not "script
>> node" - was that simply a typo or a misunderstanding?
> Er, that was a misreading.  OK, now I see where you're coming from on this
> issue.
> So the proposal is that if the <script> has no @src and a shallow clone is
> done the clone should be allowed to execute if someone subsequently adds
> kids or an @src to it, right?  I could live with that, though it seems to
> complicate the mental model a bit over "clones of scripts that have executed
> don't execute, no matter what you do with them".

In other words, cloning a script node would not clone the 'has
executed' flag? Independent of if the clone is deep or not?

I could live with that too, though I'd be somewhat worried about
people cloning a subtree that happens to contain a <script> node and
then inserting that subtree somewhere else, thus causing the script to

>> I'm not arguing that whichever implementation is supported by some weird
>> reading of the spec - merely thinking aloud about what *makes sense*.
> Oh, agreed.

Same here.

/ Jonas
Received on Monday, 19 January 2009 18:29:41 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:41 UTC