Re: <script> elements running only once

Alexander Adam:
> Hmm.. how would you decided whether that script has already been
> inserted?

Have a flag on the DOM object.

> I.e. what if I do move the position of an existing script
> node? This would cause the script to be re-eval'd again.. I am really
> uncertain if we should really allow such modifications after the
> script context and everything has been established as this could lead
> to more issues than it'd solve.. and it'd also open some more security
> issues (i.e. infinite loading loops on onload and such things). What
> you think?

I don’t think there’s any particular problem with allowing a <script> to
be re-executed if it is removed and then re-inserted into the document.
The only issue is that, as written in Tiny 1.2, the behaviour of
<svg:script> elements is different from HTML 5 (where each <html:script>
element can run only once in its lifetime).

Cameron McCormack ≝

Received on Monday, 9 June 2008 08:26:51 UTC