Re: <script> elements running only once

Hi Cam,

>Hi Alex.
>
>Alexander Adam:
>> I'd like to note that it's hard to re-execute scripts once they're
>> in the context it's almost impossible to take them out again if the
>> script engine doesn't support it. For example, Renesis uses Jscript
>> and we do not have any chance to get it out except shutting the whole
>> engine down, then restarting it and re-inserting all scripts..
>
>Yeah, I don’t think the scripts should be “removed” if the <script>
>element is removed from the document.  (Neither the SVG Tiny 1.2 text
>nor the HTML 5 text require that.)  Re-executing a <script> element
>shouldn’t be hard though, if we decided to keep that requirement, since
>it should be just the same as ‘eval’ing the text content of the element.

Logically if the text content contains function definitions then they should
only be evaluated the first time they are encountered. So the behaviour
you suggest seems reasonable.

Alex

Received on Monday, 9 June 2008 07:56:23 UTC