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

Re: SVGSVGElement.toDataURL()

From: Robert Longson <longsonr@gmail.com>
Date: Mon, 11 Mar 2013 14:26:26 +0000
Message-ID: <CAOu7Uv5iH4k6jkt_10wbUqYw=f_37K_FXP_O0wjJchthmCfODA@mail.gmail.com>
To: www-svg@w3.org
> Actually it would be useful to have something like innerHTML on SVGElement.
> This would allow to get a string representation of any SVG DOM tree. Once
> we have such a string representation, it's trivial to produce a DATA URI.

And that already exists too:
https://developer.mozilla.org/en-US/docs/XMLSerializer

Or DOMParser to go the other way:
https://developer.mozilla.org/en-US/docs/DOM/DOMParser.

And yes these are cross-browser.

So no new wheels need be invented ;-)

Robert.
Received on Monday, 11 March 2013 14:26:56 UTC

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