Closed
Bug 649599
Opened 11 years ago
Closed 10 years ago
Make getAttributeNS return null for absent attributes
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: Ms2ger, Assigned: Ms2ger)
References
()
Details
(Keywords: dev-doc-complete, Whiteboard: [wdc])
Attachments
(2 files)
2.03 KB,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
2.74 KB,
patch
|
Ms2ger
:
review-
|
Details | Diff | Splinter Review |
No description provided.
Attachment #525645 -
Flags: review?(peterv)
Flags: in-testsuite+
![]() |
||
Comment 1•11 years ago
|
||
Is this web-compatible? I thought browsers had converged on getAttribute and getAttributeNS returning "" and the DOM spec just hadn't been errata'd accordingly (and that Web DOM Core was going to make that change).
Assignee | ||
Comment 2•11 years ago
|
||
Almost. Browsers have converged on getAttribute returning null, while DOM specs required the empty string. (<http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-666EE0F9>.) IIRC, there was no consensus either way for getAttributeNS, but it seems to make more sense to have them consistent.
![]() |
||
Comment 3•11 years ago
|
||
Oh, ok. so I just had it backwards. Gotcha.
Comment 5•11 years ago
|
||
Comment on attachment 525645 [details] [diff] [review] Patch v1 How woudl you feel about doing this in GetAttr instead? There shouldn't be too many implementations of that.
Assignee | ||
Comment 6•11 years ago
|
||
That works for me. (I understood void strings to be frowned upon except for passing to JS directly, though.)
Assignee | ||
Comment 7•11 years ago
|
||
Attachment #525645 -
Attachment is obsolete: true
Attachment #525645 -
Flags: review?(peterv)
Attachment #586800 -
Flags: review?(peterv)
Assignee | ||
Comment 8•11 years ago
|
||
Comment on attachment 586800 [details] [diff] [review] Patch v2 Yeah, no. This makes reflected attributes return null, and that breaks the web.
Attachment #586800 -
Flags: review?(peterv) → review-
Assignee | ||
Updated•11 years ago
|
Attachment #525645 -
Attachment is obsolete: false
Attachment #525645 -
Flags: review?(peterv)
Updated•11 years ago
|
Attachment #525645 -
Flags: review?(peterv) → review+
Assignee | ||
Comment 9•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1eab6ae9e060
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Keywords: dev-doc-needed
Resolution: --- → FIXED
Whiteboard: [wdc][needs review] → [wdc]
Target Milestone: --- → mozilla13
Comment 10•10 years ago
|
||
Docs updated: https://developer.mozilla.org/en/DOM/element.getAttributeNS Mentioned on Firefox 13 for developers.
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•