Re: adding image namespace in svg through JS still doesn't show me the picture

Cameron McCormack <[email protected]> Wed, 3 Aug 2011 09:38:10 +1200
Newsgroups gmane.comp.mozilla.devel.svg
Organization Mozilla Corporation
Message-ID <[email protected]>
Martin Honnen schrieb am 02.08.2011 16:20:
> > Well you certainly need
> >    bild.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', 
> > BildURL)
> > to create the proper XLINK href attribute.

Holger Jeromin:
> My guess would be
> bild.setAttributeNS('http://www.w3.org/1999/xlink', 'href', BildURL);

Either of those should work, and are roughly equivalent.  (The only time
it really matters whether you specify a prefix in the second argument is
when you are doing a naive serialisation of the DOM to XML, where you
assume the specified prefix is correct.  Which you shouldn’t.)

-- 
Cameron McCormack ≝ http://mcc.id.au/
_______________________________________________
dev-tech-svg mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-svg