Bug 113580 - Remove hasAttributes
Summary: Remove hasAttributes
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://dom.spec.whatwg.org/#element
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-29 07:27 PDT by Erik Arvidsson
Modified: 2022-08-06 15:00 PDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Arvidsson 2013-03-29 07:27:27 PDT
Firefox does not support hasAttributes (not even on Element). It is not part of the latest DOM spec either.

It sounds like a high risk. We should watch the outcome of this battle:

https://bugzilla.mozilla.org/show_bug.cgi?id=849661
Comment 1 Alexey Proskuryakov 2013-03-29 08:39:48 PDT
Looks like Mozilla folks are removing it in part due to believing that WebKit doesn't support it?

"WebKit seems not to support the method, so probably there's no big compat risk."
Comment 2 Aryeh Gregor 2013-04-02 07:45:24 PDT
Yeah, whoops -- I tested a non-element for support.  At this point I think it should be re-added to the spec.  Spec bug:

https://bugs.webkit.org/show_bug.cgi?id=113580
Comment 3 Aryeh Gregor 2013-04-02 07:46:07 PDT
I meant: https://www.w3.org/Bugs/Public/show_bug.cgi?id=21522
Comment 4 Michael Kaply 2013-04-02 07:54:45 PDT
> Looks like Mozilla folks are removing it in part due to believing that WebKit doesn't support it?

Webkit had it, but removed it. I discovered this from some code that broke in Chrome 25.

http://code.google.com/p/chromium/issues/detail?id=222421

Webkit had it, then removed it.
Firefox decided to remove it because Webkit doesn't have it.
The core question here is why was it removed from Webkit in the first place.
Comment 5 Aryeh Gregor 2013-04-02 08:30:23 PDT
WebKit didn't remove it, it moved it from Node to Element.  This follows the newer DOM spec.  I don't get why the spec moves things like this, though.
Comment 6 Erik Arvidsson 2013-04-02 08:36:01 PDT
(In reply to comment #5)
> WebKit didn't remove it, it moved it from Node to Element.  This follows the newer DOM spec.  I don't get why the spec moves things like this, though.

Only elements can have attributes so having attribute related APIs on non Elements is nonsensical.
Comment 7 Ahmad Saleem 2022-08-06 15:00:34 PDT
All browsers support it now as per MDN, I don't think we are going to remove it:

Link - https://developer.mozilla.org/en-US/docs/Web/API/Element/hasAttributes

I am going to mark this as "RESOLVED WONTFIX". Please ignore, if I am wrong and mark it accordingly. Thanks!