Re: [SVGMobile12] Question on details of when <script> elements execute

Doug Schepers wrote:

> Scripting logic associated with a given script event must not be raised,

Er... this seems to have lost a large chunk.  I _think_ what Andre initially 
sent is more like (trying to disentangle the URIs):

 > Scripting logic associated with a given script element is made available for
 > execution when the element is added to the DOM tree. Removing or altering a
 > script element after the script-content is in the scripting context and
 > available for execution will not prevent the script from executing nor the
 > associated load event from being raised. Removing or altering a script element
 > before the script-content is in the scripting context will prevent the script
 > from executing, the script-content will not be added to the scripting context
 > and the associated load event will not be raised. Altering the xlink:href on a
 > script element in the DOM tree has no effect; loading of the referenced
 > resource is not required, it must not be added to the scripting context and a 
 > load event must not be raised, even if the initial script-content had not been
 > made fully available for execution. This processing model is valid for both
 > elements which are created through loading a document fragment and for
 > elements added using DOM methods."

Which sounds pretty good to me.  The only remaining concern I have is that it's 
not clear whether "Removing or altering a script element before the 
script-content is in the scripting context will prevent the script from 
executing" means it will prevent it, period, or just for now.  For example, if I 
insert a script into the document, then remove it before the script-content is 
in the scripting context, then reinsert it later, will it start getting the 
script-content again and execute it?  Or no?  The intent sounds like "no" to me 
(or at least that's what I'd expect based on HTML UA experience), but that's not 
clear from the spec. The clause about a script only executing once doesn't cover 
this, since the script is not in fact executing.

Other than this minor nit, this looks great.  Thank you!

-Boris

Received on Saturday, 5 August 2006 03:57:27 UTC