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

Set Attr and related APIs as supported since Safari 1 #9565

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

foolip
Copy link
Contributor

@foolip foolip commented 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

@github-actions github-actions bot added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label 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
@Elchi3 Elchi3 merged commit 52b06d2 into mdn:master Mar 23, 2021
@foolip foolip deleted the webkit-attr branch March 23, 2021 11:04
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.

2 participants