Closed Bug 1404022 Opened 7 years ago Closed 7 years ago

setAttributeNode() is incorrectly deprecated.

Categories

(Core :: DOM: Core & HTML, defect, P3)

56 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: kevin, Assigned: ehsan.akhgari)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce:

I set an attribute on a dom object using setAttributeNode().


Actual results:

Firefox console reported: "Use of setAttributeNode() is deprecated. Use setAttribute() instead."


Expected results:

No deprecation notice should have been issued. setAttributeNode() is part of the current standard.

https://dom.spec.whatwg.org/#dom-element-setattributenode
Also no other browser marks this function as deprecated.
Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
These were marked as deprecated in bug 661327.

bz, anne, do we stil want to pursue removing them some day?
Flags: needinfo?(bzbarsky)
Flags: needinfo?(annevk)
No, time to give up. Thanks kevin for reporting this.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(bzbarsky)
Flags: needinfo?(annevk)
Priority: -- → P3
We also have deprecation warnings for getAttributeNode/getAttributeNodeNS/removeAttributeNode/createAttribute/createAttributeNS.  If those also need to be revised we should file follow-up bugs.
Assignee: nobody → ehsan
Keywords: dev-doc-needed
(In reply to :Ehsan Akhgari (needinfo please, extremely long backlog) from comment #4)
> We also have deprecation warnings for
> getAttributeNode/getAttributeNodeNS/removeAttributeNode/createAttribute/
> createAttributeNS.

Anne confirmed on IRC.  Filed bug 1406493 as a follow-up.
Attachment #8916093 - Flags: review?(amarchesini) → review+
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e136f53974d8
Remove the deprecation warnings for Element.setAttribute/setAttributeNS; r=baku
https://hg.mozilla.org/mozilla-central/rev/e136f53974d8
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
I've checked the docs, and we don't mention it being deprecated anywhere. We just say that setAttribute() is the more common way of setting attributes.
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: