W3C home > Mailing lists > Public > www-svg@w3.org > March 2009

Re: Script in SVG vs. HTML (was: Input on the agenda)

From: Henri Sivonen <hsivonen@iki.fi>
Date: Wed, 11 Mar 2009 09:43:41 +0200
Cc: public-html@w3.org, www-svg <www-svg@w3.org>
Message-Id: <E603BA03-593F-4B2A-9E58-5BBA6E6A7F4D@iki.fi>
To: Doug Schepers <schepers@w3.org>
On Mar 10, 2009, at 17:46, Doug Schepers wrote:

> Jonas Sicking wrote (on 3/9/09 8:00 PM):
>>
>> Personally I would like to see something that is even more HTMLy than
>> Hixies current proposal. I don't like at all that we have to use a
>> different tokenizer in "HTML mode" and in "foreign content mode".  
>> This
>> is both confusing to web developers and painful for end users (as
>> performance and code complexity suffers).
>
> Along not-entirely-unrelated lines, the SVG WG is currently looking  
> at aligning SVG script handling with that of HTML.  Feedback on this  
> topic is most welcome.


In Gecko, both HTML <script> and SVG <script> DOM nodes are also  
instances of nsIScriptElement and, thus, react to the same methods.  
The XML tree builder (aka. content sink) in Gecko starts both types of  
scripts in exactly the same way. In the HTML5 parser currently, the  
script starting code doesn't even know whether a script element it has  
is an HTML or SVG script. Both are started in exactly the same way.  
(It follows that both can do document.write().)

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/
Received on Wednesday, 11 March 2009 07:44:27 GMT

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