Re: [svg-developers] Re: Forcing browsers to render SVG in text/html context

>
> Nevertheless, I still find the <script type="image/svg+xml"> [1]
> approach sounds a bit of a hack and hope to investigate further in
> order to understand if it's possible to use more standards markup.
> Also, I'm about to file a couple of small issues I've noticed in a set
> of quick experiments. ;-)
>

HTML 5 allows it but yes it is a hack :)

I would love to allow direct embedding of SVG into HTML. Here's a
challenge to the community. If you can figure out how to get XML style
empty tags to parse correctly, then that would make this much more
realistic. See if you can get the following sample to show up in the
DOM correctly under normal text/html:

<div><svg><g><rect/><rect/></g><g><rect/></g></svg></div>

This would need to work for FF 3+, Safari 3+, and IE 6/7/8. You have
no idea how many crazy hacks staying up all night I've thrown at this
problem without success, but I'm sure there's a way to do it. I'm out
of ideas for the time being so if someone has a brilliant solution I'm
all ears :)

BTW, Helder, if you start playing with the SVG Web toolkit feel free
to ping me if you have questions!

Received on Thursday, 23 July 2009 15:35:35 UTC