- From: Jonas Sicking <jonas@sicking.cc>
- Date: Sat, 17 Jan 2009 21:48:16 -0800
- To: "Hallvord R. M. Steen" <hallvord@opera.com>
- Cc: public-html@w3.org
On Sat, Jan 17, 2009 at 5:17 PM, Hallvord R. M. Steen <hallvord@opera.com> wrote: > > Here is another issue for Ian to ponder while working on the script > execution stuff: > > If you clone a script node and append the to the document, does it run? > > Browsers differ: > > cloneNode(true) - Opera no, Firefox no, Safari yes, IE fails > cloneNode(false) - Opera yes, Firefox no, Safari yes, IE fails > > From my naturally biased point of view I think Opera makes more sense - a > "deep" clone remembers that the script was already executed, a shallow > doesn't because it doesn't clone the script code. I think any use cases one > might think of for re-executing script clones are already much better > handled by putting the code inside a function and doing a simple function > call. Seems weird to me the the deep argument affects anything other than if children are cloned. It also seems to go against the DOM core spec. Other than that I don't have strong opinion on if a clone should clone the 'has executed' flag or not. / Jonas
Received on Sunday, 18 January 2009 05:48:50 UTC