[Webkit-unassigned] [Bug 27592] New: Cannot set xlink:href for <image> elements created programmatically

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 22 20:20:39 PDT 2009


           Summary: Cannot set xlink:href for <image> elements created
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: SVG
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: codedread at gmail.com

Created an attachment (id=33312)
 --> (https://bugs.webkit.org/attachment.cgi?id=33312)
Test Case showing the problem

The test case attached illustrates the problem:

  var i3 =
  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);

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list