W3C home > Mailing lists > Public > www-svg@w3.org > August 2006

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

From: Chris Lilley <chris@w3.org>
Date: Sun, 6 Aug 2006 23:04:05 +0200
Message-ID: <1903241022.20060806230405@w3.org>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-svg@w3.org

On Sunday, August 6, 2006, 6:06:52 PM, Boris wrote:

BZ> Chris Lilley wrote:
>>>  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,
>> 
>> and assuming it completely loads this time
>> 
>>>  will it start getting the 
>>> script-content again and execute it?
>> 
>> Yes.

BZ> That's not consistent with what happens if I change the href of the script
BZ> element...  If I change the href without removing from the document, you're
BZ> saying the original href is what should execute, but if I remove before load
BZ> completes, change href and reinsert the new href should execute?  Why the
BZ> inconsistency?

You are not comparing like with like.

If you change the href on an already loaded script element, the script content has already been added to the scripting context.

If you change it or delete it before its has loaded then, well, it hasn't loaded.

If you add something (whether it is the same as something that was transitorily there before or not is immaterial) then, if it loads, it gets added to the scripting context.


-- 
 Chris Lilley                    mailto:chris@w3.org
 Interaction Domain Leader
 Co-Chair, W3C SVG Working Group
 W3C Graphics Activity Lead
 Co-Chair, W3C Hypertext CG
Received on Sunday, 6 August 2006 21:04:25 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:35 GMT