--- In svg-developers@yahoogroups.com, Jon Ferraiolo <[EMAIL PROTECTED]> wrote: > > > To elaborate on Bjoern's comments, if script elements point to external > JavaScript, then the timing of the HTTP requests to pull down the various > JavaScript files is uncertain, and thus other elements in the DOM tree > might have been parsed and processed before the script logic associated > with a given script element is executed. > > I assume that HTML has the same limitation as SVG in this regard. (If not, > then SVG should include whatever feature that HTML has.)
In text/html content browsers support document.write/document.writeln to insert content while the page loads at the place of the script element (respectively the document.write/writeln call) so the common implementations block HTML parsing until script has been fetched and executed. The HTML 4 specfication for the HTML script element defines an attribute named defer that authors can apply to indicate to the user agent that fetching/executing of the script code can be deferred as it does not add content. Of the major browsers I think only IE supports the defer attribute, meaning it really defers script fetching and parsing if the attribute is present. For real XHTML (XHTML served as application/xhtml+xml or application/xml or text/xml) the situation is much different, while docment.write/writeln is part of the W3C DOM Level 2 HTML module saying it applies to both HTML 4.01 as well as XHTML 1.0 documents browser implementors have refused to implement document.write/writeln in XHTML documents. And with Mozilla at least one major implementation exists that acknowledges that its XML parsing and rendering is not done incrementally <http://www.mozilla.org/docs/web-developer/faq.html#xhtmldiff>. Thus with Mozilla and XHTML you can't rely on your script being parsed and executed before any XHTML elements that follow. ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/