Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove api.Node.localName/namespaceURI/prefix #9561

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

foolip
Copy link
Collaborator

@foolip foolip commented Mar 22, 2021

api.Element.prefix was 13 for Edge, but confirmed to have been in 12 by
mdn-bcd-collector: foolip/mdn-bcd-results#1772

Notes on api.Node.prefix:

  • "this property was read-write; starting with Firefox 5.0 it is
    read-only, following the specification" not necessary to capture even
    if had been a recent change, as the old behavior was a superset of the
    new behavior.
  • "Only supported on Element" captured by the IE support
    on api.Attr.prefix being false, like for localName and namespaceURI.

Fixes #6545.

@github-actions github-actions bot added the data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Mar 22, 2021
api/Attr.json Outdated Show resolved Hide resolved
foolip added a commit to foolip/content that referenced this pull request Mar 22, 2021
This follows BCD cleanup in mdn/browser-compat-data#9561.

The deleted pages have to be redirected to something, so pick Element as
the more likely destination. Element.localName and Element.namespaceURI
appear in popularities.json, while Attr variants do not.
foolip added a commit to foolip/browser-compat-data that referenced this pull request Mar 23, 2021
The difference between Safari 1 and 1.3 is of course not important, but
some assumption has to be made to fix localName/namespaceURI/prefix:
mdn#9561

Based on current Web IDL, the set of related APIs are:
- Document.createAttribute
- Document.createAttributeNS
- Element.attributes (a NamedNodeMap)
- Element.getAttributeNode
- Element.getAttributeNodeNS
- Element.setAttributeNode
- Element.setAttributeNodeNS
- Element.removeAttributeNode
- NamedNodeMap and all of its members

All can be found in the bindings of the revision tagged Safari 85:
https://trac.webkit.org/browser/webkit/trunk/WebCore/khtml/ecma/kjs_dom.lut.h?rev=4552

The only complication is Attr.localName/namespaceURI/prefix, which was
then on Node, but judging by the implementation they probably worked:
https://trac.webkit.org/browser/webkit/trunk/WebCore/khtml/dom/dom_node.cpp?rev=4552
@foolip
Copy link
Collaborator Author

foolip commented Mar 23, 2021

This depends on #9565 to fix the lint first.

foolip added a commit to foolip/browser-compat-data that referenced this pull request Mar 23, 2021
The difference between Safari 1 and 1.3 is of course not important, but
some assumption has to be made to fix localName/namespaceURI/prefix:
mdn#9561

Based on current Web IDL, the set of related APIs are:
- Document.createAttribute
- Document.createAttributeNS
- Element.attributes (a NamedNodeMap)
- Element.getAttributeNode
- Element.getAttributeNodeNS
- Element.setAttributeNode
- Element.setAttributeNodeNS
- Element.removeAttributeNode
- NamedNodeMap and all of its members

All can be found in the bindings of the revision tagged Safari 85:
https://trac.webkit.org/browser/webkit/trunk/WebCore/khtml/ecma/kjs_dom.lut.h?rev=4552

The only complication is Attr.localName/namespaceURI/prefix, which was
then on Node, but judging by the implementation they probably worked:
https://trac.webkit.org/browser/webkit/trunk/WebCore/khtml/dom/dom_node.cpp?rev=4552

Because some Element.* entries were set to 1, api.Element itself was
also set to 1, and the following non-Attr-related features also
confirmed to be in kjs_dom.lut.h above:

Finally, Element.className and id were here:
https://trac.webkit.org/browser/webkit/trunk/WebCore/khtml/ecma/kjs_html.lut.h?rev=4552
foolip added a commit to foolip/browser-compat-data that referenced this pull request Mar 23, 2021
The difference between Safari 1 and 1.3 is of course not important, but
some assumption has to be made to fix localName/namespaceURI/prefix:
mdn#9561

Based on current Web IDL, the set of related APIs are:
- Document.createAttribute
- Document.createAttributeNS
- Element.attributes (a NamedNodeMap)
- Element.getAttributeNode
- Element.getAttributeNodeNS
- Element.setAttributeNode
- Element.setAttributeNodeNS
- Element.removeAttributeNode
- NamedNodeMap and all of its members

All can be found in the bindings of the revision tagged Safari 85:
https://trac.webkit.org/browser/webkit/trunk/WebCore/khtml/ecma/kjs_dom.lut.h?rev=4552

The only complication is Attr.localName/namespaceURI/prefix, which was
then on Node, but judging by the implementation they probably worked:
https://trac.webkit.org/browser/webkit/trunk/WebCore/khtml/dom/dom_node.cpp?rev=4552

Because some Element.* entries were set to 1, api.Element itself was
also set to 1, and the following non-Attr-related features also
confirmed to be in kjs_dom.lut.h above:
- Element.getAttribute
- Element.getAttributeNS
- Element.getElementsByTagName
- Element.getElementsByTagNameNS
- Element.hasAttribute
- Element.hasAttributeNS
- Element.hasAttributes (on Node)
- Element.removeAttribute
- Element.removeAttributeNS
- Element.scrollLeft (on Node)
- Element.scrollTop (on Node)
- Element.scrollHeight (on Node)
- Element.scrollWidth (on Node)
- Element.setAttribute
- Element.setAttributeNS
- Element.tagName

Finally, Element.className and id were here:
https://trac.webkit.org/browser/webkit/trunk/WebCore/khtml/ecma/kjs_html.lut.h?rev=4552
foolip added a commit to foolip/content that referenced this pull request Mar 23, 2021
This follows BCD cleanup in mdn/browser-compat-data#9561.

The deleted pages have to be redirected to something, so pick Element as
the more likely destination. Element.localName and Element.namespaceURI
appear in popularities.json, while Attr variants do not.
Elchi3 pushed a commit that referenced this pull request Mar 23, 2021
The difference between Safari 1 and 1.3 is of course not important, but
some assumption has to be made to fix localName/namespaceURI/prefix:
#9561

Based on current Web IDL, the set of related APIs are:
- Document.createAttribute
- Document.createAttributeNS
- Element.attributes (a NamedNodeMap)
- Element.getAttributeNode
- Element.getAttributeNodeNS
- Element.setAttributeNode
- Element.setAttributeNodeNS
- Element.removeAttributeNode
- NamedNodeMap and all of its members

All can be found in the bindings of the revision tagged Safari 85:
https://trac.webkit.org/browser/webkit/trunk/WebCore/khtml/ecma/kjs_dom.lut.h?rev=4552

The only complication is Attr.localName/namespaceURI/prefix, which was
then on Node, but judging by the implementation they probably worked:
https://trac.webkit.org/browser/webkit/trunk/WebCore/khtml/dom/dom_node.cpp?rev=4552

Because some Element.* entries were set to 1, api.Element itself was
also set to 1, and the following non-Attr-related features also
confirmed to be in kjs_dom.lut.h above:
- Element.getAttribute
- Element.getAttributeNS
- Element.getElementsByTagName
- Element.getElementsByTagNameNS
- Element.hasAttribute
- Element.hasAttributeNS
- Element.hasAttributes (on Node)
- Element.removeAttribute
- Element.removeAttributeNS
- Element.scrollLeft (on Node)
- Element.scrollTop (on Node)
- Element.scrollHeight (on Node)
- Element.scrollWidth (on Node)
- Element.setAttribute
- Element.setAttributeNS
- Element.tagName

Finally, Element.className and id were here:
https://trac.webkit.org/browser/webkit/trunk/WebCore/khtml/ecma/kjs_html.lut.h?rev=4552
@foolip
Copy link
Collaborator Author

foolip commented Mar 23, 2021

OK, this is now rebased and ready for review.

@Elchi3
Copy link
Member

Elchi3 commented Mar 23, 2021

This doesn't remove api.Node.prefix. Should be removed or why shouldn't it?

@foolip
Copy link
Collaborator Author

foolip commented Mar 23, 2021

It absolutely should be removed, I was so focused on the other bits that I missed it :)

api.Element.prefix was 13 for Edge, but confirmed to have been in 12 by
mdn-bcd-collector: foolip/mdn-bcd-results#1772

Notes on api.Node.prefix:
- "this property was read-write; starting with Firefox 5.0 it is
  read-only, following the specification" not necessary to capture even
  if had been a recent change, as the old behavior was a superset of the
  new behavior.
- "Only supported on <code>Element</code>" captured by the IE support
  on api.Attr.prefix being false, like for localName and namespaceURI.

Fixes mdn#6545.
Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is really great cleanup! 👍

@Elchi3 Elchi3 merged commit 62a8777 into mdn:master Mar 23, 2021
@foolip foolip deleted the rm-moved-Node-members branch March 23, 2021 13:38
Elchi3 pushed a commit to mdn/content that referenced this pull request Mar 23, 2021
* Clean up documentation for localName/namespaceURI/prefix

This follows BCD cleanup in mdn/browser-compat-data#9561.

The deleted pages have to be redirected to something, so pick Element as
the more likely destination. Element.localName and Element.namespaceURI
appear in popularities.json, while Attr variants do not.

* Update domxrefs to Node.localName/namespaceURI/prefix

* Update Firefox 48 release notes
ddbeck added a commit to ddbeck/browser-compat-data that referenced this pull request Mar 25, 2021
@Edimalius

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data for localName/namespaceURI/prefix attributes on Attr/Element/Node is inconsistent/confusing
5 participants