W3C home > Mailing lists > Public > www-svg@w3.org > September 2010

Re: Should svg work in less strict html5 documents with an html mime-type?

From: Erik Dahlstrom <ed@opera.com>
Date: Fri, 03 Sep 2010 10:44:39 +0200
To: "Kevin Ar18" <kevinar18@hotmail.com>
Cc: www-svg@w3.org
Message-ID: <op.vif7wpuogeuyw5@dhcpwifi-23-133.enst.fr>
On Fri, 03 Sep 2010 04:55:38 +0200, Kevin Ar18 <kevinar18@hotmail.com>  

>> On 9/2/10 8:21 PM, Kevin Ar18 wrote:
>> > I've noticed that when inserting svg into an html 5 document !DOCTYPE
>> > HTML that svg will not work.
>> Inserted how? And tested how?
> I was running in Opera.  It wouldn't work in regular html like so:
> The basic layout:
> file.html
> <html>
> <body>
> <svg>
> <rect>
> I wanted to see if I was misunderstanding the spec or it was a bug/lack  
> of support in the browser. 		 	   		

I would expect that to work in Opera as soon as the full HTML5 parser is  
added, however that has not yet been included in public builds.
Note: elm.innerHTML in current Opera builds isn't capable of inserting svg  
elements in the proper namespace.

I'm guessing that's how you inserted the svg content. Standard DOM 3 Core  
methods should work just fine for inserting and creating svg elements in  
all the browsers, including Opera.

Besides, if you need inline svg content to work in existing browsers then  
you'll likely need some hacks anyway, e.g script element wrappers, or  
serving as XHTML/SVG.


Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Friday, 3 September 2010 08:45:26 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:22 UTC