WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
27592
Cannot set xlink:href for <image> elements created programmatically
https://bugs.webkit.org/show_bug.cgi?id=27592
Summary
Cannot set xlink:href for <image> elements created programmatically
Jeff Schiller
Reported
2009-07-22 20:20:38 PDT
Created
attachment 33312
[details]
Test Case showing the problem The test case attached illustrates the problem: var i3 = document.documentElement.appendChild(document.createElementNS("
http://www.w3.org/2000/svg
", "image")); i3.setAttributeNS("
http://www.w3.org/1999/xlink
", "href", "foo.png"); The setAttribute on xlink:href is ignored. Works in Firefox and Opera. To work around this, you have to append the element into the DOM _after_ setting the xlink:href: var i3 = document.createElementNS("
http://www.w3.org/2000/svg
", "image"); i3.setAttributeNS("
http://www.w3.org/1999/xlink
", "href", "foo.png"); i3 = document.documentElement.appendChild(i3);
Attachments
Test Case showing the problem
(1.09 KB, image/svg+xml)
2009-07-22 20:20 PDT
,
Jeff Schiller
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Jeff Schiller
Comment 1
2009-07-22 20:44:31 PDT
Is it possible that appendChild is not returning the actual appended DOM node?
Rob Buis
Comment 2
2010-05-24 10:19:06 PDT
Hello Jeff, (In reply to
comment #1
)
> Is it possible that appendChild is not returning the actual appended DOM node?
I think this has been fixed since some time now, it works on trunk, can you confirm? Cheers, Rob.
Jeff Schiller
Comment 3
2010-09-20 20:23:24 PDT
Hi Rob, I have confirmed this, sorry for the delay. Marked resolved/fixed.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug