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

Re: SVG.innerHTML

From: Dirk Schulze <dschulze@adobe.com>
Date: Sun, 9 Mar 2014 06:35:27 +0000
To: David Dailey <ddailey@zoominternet.net>
CC: www-svg <www-svg@w3.org>
Message-ID: <1A662BAA-5910-4ADF-9DAC-4CBA148FA7E3@adobe.com>

On Mar 8, 2014, at 8:16 PM, David Dailey <ddailey@zoominternet.net> wrote:

> Hi all,
>  
> See http://srufaculty.sru.edu/david.dailey/svg/svgScaleinHTML.htm
> (doesnít work in IE or Win/Safari)
>  
> Brian Birtles  taught me something [1] recently that I felt compelled to tell my students about the next day. (It involved replacing two animateTransforms with one).
>  
> Anyhow, as a part of my example, I was interested in using SVG in-line in HTML5 Ė Iím always curious to see how that is coming along .  Just for fun I used :
>                                var O=document.getElementById("T1")
>                                var svgs=document.getElementsByTagName("svg")
>                                O.value=svgs[0].innerHTML
>  
> I still remember fondly how ASV used to have something called printNode that serialized an SVG node for us, and I wanted to make it easy to show the students the relevant source code for the SVG examples (exemplifying different approaches).
>  
> I really didnít expect this to work, but thought it would be very fun if it did. It worked in FF, Chrome and Opera 19. (not in IE10 or IE11 or Safari).
>  
> My question: is this just a coincidence that it works right now in three browsers? Will it stop working in the future or might we expect that Safari and IE might one time join the others? I rather like being able to do this, since it simplifies the job of teaching.
>  

Just to be clear. It works in Safari too. Just not in the Win version that seems not to be updated anymore (version 5.x on Win vs version 7.x on Mac). If you test in Safari please do it on Mac or iOS.

Greetings,
Dirk

> Cheers
> David
>  
> [1] https://groups.yahoo.com/neo/groups/svg-developers/conversations/messages/66336
Received on Sunday, 9 March 2014 06:35:59 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:51 UTC