Re: DOMParser() and SVG
elliottcable <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.svg |
|---|---|
| Message-ID | <[email protected]> |
Got firefox launching, here's what FireFox gives me if I use a data:
URI instead of a mime type:
http://tr.im/jch?grabup
For your copy-and-paste pleasure, here's the code I ran:
svgSource = '<rect xmlns="http://www.w3.org/2000/svg"
class="background" x="0" y="0" height="100" xmlns="http://www.w3.org/2000/svg
" width="100">'
new DOMParser().parseFromString(svgSource, "data:image/svg
+xml").documentElement
And here's the error I got:
[Exception... "Cannot modify properties of a WrappedNative"
nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)" location:
"JS frame :: about:blank :: anonymous :: line 72" data: no]
On Oct 23, 2008, at 3:59 AM, Boris Zbarsky wrote:
> [email protected] wrote:
>> I have tried the same in all kinds of variations, but I can't get a
>> working SVG presentation from a javascript-generated string.
>
> data:image/svg+xml,....
>
> doesn't work for you?
>
> -Boris
> _______________________________________________
> dev-tech-svg mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-tech-svg