- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Wed, 01 Dec 2004 11:37:31 -0600
- To: Jim Ley <jim@jibbering.com>
- CC: www-svg@w3.org
Jim Ley wrote: > Can I ask what Mozilla has done in the HTML world in this respect, so we > can raise the issue against HTML 4.01 and XHTML 1.0 /1.1 with that as a > proposal to specify it there? Every <html:script> node has a flag to indicate whether the associated script has been executed. For any given script node, the script is executed only if the flag is false; once the script has been executed, the flag is set to true. The execution happens when the script has been inserted into the document and it either has an "src" attribute or has children (during parsing, script nodes are not inserted into the document until the end tag is encountered, to avoid having to add a "has been fully parsed" condition, but that condition has to be satisfied too, of course). Modification of the src attribute or addition of childnodes can therefore cause execution of a <script> if it has not been executed already. In addition, there is a flag that indicates that the script is currently executing. While this flag is set, the script cannot be caused to execute (say by changing its src). The effect is basically the same as that of setting the "has executed" flag mentioned in the previous paragraph right before starting execution. There are also some complications involving innerHTML and IE's syntax for declaring event handlers via <script> tags that had to be introduced for IE compatibility, but those aren't really relevant to a W3C specification. Note that the HTML working group has been ignoring errata suggestions to HTML 4.01 for years now, so I wish you luck with getting them to specify it. > How did you manage to do this without raising it as an issue in those technologies? By carefully reverse-engineering the relevant de-facto standard ("do what IE does"). That's a situation we'd all like to avoid in the SVG world (with IE replaced by Adobe or Batik or whatever), no? Cheers, -Boris
Received on Wednesday, 1 December 2004 17:40:12 UTC