Closed Bug 620295 Opened 11 years ago Closed 11 years ago

SVG <a> elements do not expose their href properties in JS

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: heycam, Assigned: heycam)

Details

Attachments

(2 files, 1 obsolete file)

SVGAElement objects in the DOM should implement SVGURIReference and expose a .href property.  Doing

  javascript:alert(document.createElementNS('http://www.w3.org/2000/svg', 'a').href)

alerts "undefined", while

  javascript:alert(document.createElementNS('http://www.w3.org/2000/svg', 'image').href)

alerts "[object SVGAnimatedString]".
Assignee: nobody → cam
Attachment #499210 - Flags: review?(jwatt)
Attachment #499210 - Attachment is obsolete: true
Attachment #499210 - Flags: review?(jwatt)
Comment on attachment 499211 [details] [diff] [review]
with correct bug number in test comment this time

I'm assuming you meant to rerequest review on the new patch after it got cancelled on the obsolete patch.

So we just forgot to expose the logic for this. Oops. :/

Thanks for the thorough tests! Can you convert a-href-01.svg into a mochitest though please, since it's just testing DOM functionality. r=jwatt with that.
Attachment #499211 - Flags: review+
OS: Mac OS X → All
Hardware: x86 → All
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/e2d5473a36f6
Status: NEW → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.