Skip to content

Commit

Permalink
Set Attr and related APIs as supported since Safari 1
Browse files Browse the repository at this point in the history
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
  • Loading branch information
foolip committed Mar 23, 2021
1 parent 6ab576e commit 2acec49
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
6 changes: 3 additions & 3 deletions api/Attr.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"notes": "This API was previously available on the <a href='https://developer.mozilla.org/docs/Web/API/Node'><code>Node</code></a> API."
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -185,7 +185,7 @@
"notes": "This API was previously available on the <a href='https://developer.mozilla.org/docs/Web/API/Node'><code>Node</code></a> API."
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -288,7 +288,7 @@
"notes": "This API was previously available on the <a href='https://developer.mozilla.org/docs/Web/API/Node'><code>Node</code></a> API."
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down
42 changes: 21 additions & 21 deletions api/Element.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"version_added": "10.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -1297,7 +1297,7 @@
"version_added": "10.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -1821,7 +1821,7 @@
"version_added": "10.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -3818,7 +3818,7 @@
"version_added": "10.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -3914,7 +3914,7 @@
"version_added": "≤12.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -3962,7 +3962,7 @@
"version_added": "≤12.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -4012,7 +4012,7 @@
"version_added": "≤12.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -4219,7 +4219,7 @@
"version_added": "10.1"
},
"safari": {
"version_added": "1.3",
"version_added": "1",
"notes": "Initially, this method was returning a <code>NodeList</code>; it was then changed to reflect the spec change."
},
"safari_ios": {
Expand Down Expand Up @@ -4329,7 +4329,7 @@
"notes": "Initially, this method was returning a <code>NodeList</code>; it was then changed to reflect the spec change."
},
"safari": {
"version_added": "1.3",
"version_added": "1",
"notes": "Initially, this method was returning a <code>NodeList</code>; it was then changed to reflect the spec change."
},
"safari_ios": {
Expand Down Expand Up @@ -4429,7 +4429,7 @@
"version_added": "10.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -4477,7 +4477,7 @@
"version_added": "≤12.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -4527,7 +4527,7 @@
"version_added": "≤12.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -4663,7 +4663,7 @@
"version_added": "≤12.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -6543,7 +6543,7 @@
"version_added": "≤12.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -6591,7 +6591,7 @@
"version_added": "≤12.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -7526,7 +7526,7 @@
"version_added": "10.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -7720,7 +7720,7 @@
"version_added": "10.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -7963,7 +7963,7 @@
"version_added": "≤12.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -8013,7 +8013,7 @@
"version_added": "≤12.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -8061,7 +8061,7 @@
"version_added": "≤12.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down Expand Up @@ -8458,7 +8458,7 @@
"version_added": "10.1"
},
"safari": {
"version_added": "1.3"
"version_added": "1"
},
"safari_ios": {
"version_added": "1"
Expand Down

0 comments on commit 2acec49

Please sign in to comment.