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

Re: cloneNode() and script execution

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 19 Jan 2009 09:31:12 -0500
Message-ID: <49748EB0.6000309@mit.edu>
To: "Hallvord R. M. Steen" <hallvord@opera.com>
CC: public-html@w3.org

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".

I suspect there are no reasonable use cases in either direction here, so 
  we shouldn't worry as much about that as in some cases, but please 
correct me if I'm wrong.

Given lack of use cases, I'd tend to lean with the simpler model, but as 
I said I can see the merits of the shallow cloning argument in this case.

> 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.

> Perhaps I came across as trying to accusse Gecko of a spec violation?? 

No, not at all.  Just my misreading of "code" for "node"

-Boris
Received on Monday, 19 January 2009 14:32:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:28 GMT