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

RESOLVED FIXED

Status

()

RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: heycam, Assigned: heycam)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

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
Created attachment 499210 [details] [diff] [review]
Give SVGAElement objects an href property in JS
Attachment #499210 - Flags: review?(jwatt)
Attachment #499210 - Attachment is obsolete: true
Attachment #499210 - Flags: review?(jwatt)
Created attachment 499211 [details] [diff] [review]
with correct bug number in test comment this time
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+

Updated

8 years ago
OS: Mac OS X → All
Hardware: x86 → All
Created attachment 499222 [details] [diff] [review]
Landable patch with review comments addressed
Attachment #499222 - Flags: approval2.0?
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/e2d5473a36f6
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.