Re: cloneNode() and script execution

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 UTC