- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Wed, 01 Dec 2004 12:08:12 -0600
- To: Jim Ley <jim@jibbering.com>
- CC: www-svg@w3.org
Jim Ley wrote: > How is defer handled? "defer" is currently ignored in Mozilla. All external script loads block further parsing until the script is loaded. The reason for this is that "defer" is vastly underspecified in HTML and implemented in a very odd way in IE (deferred scripts execute in a well-defined order that's different from document order), so trying to implement "defer" in general raises a whole new bunch of issues. We may do it sometime, if we figure out how it should behave, but getting it to be compatible with IE is hard. Again, this is the sort of issue we want to avoid in SVG. > and if you're inserting 2 script elements and > some HTML at the same time, what's the order of execution Document order. > and what happens with: > > fred=alert > addChild(document.body,'<script > type="text/javascript">fred=confirm</script>'); > fred() > > (where addChild is an appropriate script to insert that HTML into the > current document) I'd have to trace through this to be sure, but I suspect fred() will call confirm() in this case. Again, this case can _already_ arise in SVG during document load, so it needs to be specified in any case. > does the defer attribute make a difference? Possibly. As I said, I've not given the defer attribute enough thought to figure out how it should behave. > Whilst your prose is a good starting point, I don't think it actually > defines it well enough for a specification. I agree. Luckily, I'm not the one writing the specification; the working group is. ;) > There's a similar problem with every working group of > course, there's no CSS2 errata and no SVG 1.1 errata Excuse me? Whilst there are indeed no SVG 1.1 errata, the CSS2 errata are found at <http://www.w3.org/Style/css2-updates/REC-CSS2-19980512-errata.html>, are quite extensive, and are clearly linked from the CSS2 specification (see the "Errata" section at <http://www.w3.org/TR/CSS2/>). > but that isn't what IE does. IE requires the defer attribute to > execute scripts inserted after the document has loaded (or at least it > did a few of years back, I've not checked recently.) It doesn't in recent versions, as far as I can tell. -Boris
Received on Wednesday, 1 December 2004 18:10:41 UTC