From 2650f2ef309afd2e4bbb29f96ddea679717fc742 Mon Sep 17 00:00:00 2001 From: dietrich ayala Date: Wed, 16 Oct 2024 16:17:11 +0700 Subject: [PATCH 01/13] Add document feature --- features/document.yml | 114 +++++++++ features/document.yml.dist | 494 +++++++++++++++++++++++++++++++++++++ 2 files changed, 608 insertions(+) create mode 100644 features/document.yml create mode 100644 features/document.yml.dist diff --git a/features/document.yml b/features/document.yml new file mode 100644 index 00000000000..4ffdee4bd27 --- /dev/null +++ b/features/document.yml @@ -0,0 +1,114 @@ +# BCD: https://github.com/mdn/browser-compat-data/tree/main/api/Document.json +# MDN: https://developer.mozilla.org/docs/Web/API/Document +# CIU: https://caniuse.com/?search=Document +draft_date: 2024-09-30 +name: Document +description: "The Document interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree." +spec: https://dom.spec.whatwg.org/#interface-document,https://html.spec.whatwg.org/multipage/dom.html#the-document-object,https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface,https://w3c.github.io/pointerlock/#extensions-to-the-document-interface,https://w3c.github.io/selection-api/#extensions-to-document-interface +#caniuse: +#status: +# compute_from: +compat_features: + - api.Document + - api.Document.DOMContentLoaded_event + - api.Document.activeElement + - api.Document.body + - api.Document.close + - api.Document.cookie + - api.Document.currentScript + - api.Document.defaultView + - api.Document.designMode + - api.Document.dir + - api.Document.embeds + - api.Document.forms + - api.Document.getElementsByName + - api.Document.hasFocus + - api.Document.head + - api.Document.hidden + - api.Document.images + - api.Document.lastModified + - api.Document.links + - api.Document.open + - api.Document.plugins + - api.Document.readyState + - api.Document.readystatechange_event + - api.Document.referrer + - api.Document.scripts + - api.Document.scroll_event + - api.Document.securitypolicyviolation_event + - api.Document.title + - api.Document.visibilityState + - api.Document.visibilitychange_event + - api.Document.write + - api.Document.writeln + + # BCD: https://github.com/mdn/browser-compat-data/tree/main/api/HTMLDocument.json + # MDN: https://developer.mozilla.org/docs/Web/API/HTMLDocument + # CIU: https://caniuse.com/?search=HTMLDocument + # description: "For historical reasons, Window objects have a window.HTMLDocument property whose value is the Document interface. So you can think of HTMLDocument as an alias for Document, and you can find documentation for HTMLDocument members under the documentation for the Document interface." + # spec: https://html.spec.whatwg.org/multipage/nav-history-apis.html#htmldocument + - api.HTMLDocument + + # from dom.yml + - api.DOMImplementation.createDocument + - api.DOMImplementation.createDocumentType + - api.DOMImplementation.createHTMLDocument + - api.Document.Document + - api.Document.URL + - api.Document.adoptNode + - api.Document.append + - api.Document.characterSet + - api.Document.childElementCount + - api.Document.children + - api.Document.compatMode + - api.Document.contentType + - api.Document.createAttribute + - api.Document.createAttributeNS + - api.Document.createCDATASection + - api.Document.createComment + - api.Document.createDocumentFragment + - api.Document.createElement + - api.Document.createElementNS + - api.Document.createEvent + - api.Document.createExpression + - api.Document.createNodeIterator + - api.Document.createProcessingInstruction + - api.Document.createRange + - api.Document.createTextNode + - api.Document.createTreeWalker + - api.Document.doctype + - api.Document.documentElement + - api.Document.documentURI + - api.Document.evaluate + - api.Document.firstElementChild + - api.Document.getElementById + - api.Document.getElementsByClassName + - api.Document.getElementsByTagName + - api.Document.getElementsByTagNameNS + - api.Document.implementation + - api.Document.importNode + - api.Document.lastElementChild + - api.Document.prepend + - api.Document.querySelector + - api.Document.querySelectorAll + - api.Document.replaceChildren + - api.DocumentFragment + - api.DocumentFragment.DocumentFragment + - api.DocumentFragment.append + - api.DocumentFragment.childElementCount + - api.DocumentFragment.children + - api.DocumentFragment.firstElementChild + - api.DocumentFragment.getElementById + - api.DocumentFragment.lastElementChild + - api.DocumentFragment.prepend + - api.DocumentFragment.querySelector + - api.DocumentFragment.querySelectorAll + - api.DocumentFragment.replaceChildren + - api.DocumentType + - api.DocumentType.after + - api.DocumentType.before + - api.DocumentType.name + - api.DocumentType.publicId + - api.DocumentType.remove + - api.DocumentType.replaceWith + - api.DocumentType.systemId diff --git a/features/document.yml.dist b/features/document.yml.dist new file mode 100644 index 00000000000..d8a211a8f28 --- /dev/null +++ b/features/document.yml.dist @@ -0,0 +1,494 @@ +# Generated from: document.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: high + baseline_low_date: 2022-03-14 + baseline_high_date: 2024-09-14 + support: + chrome: "86" + chrome_android: "86" + edge: "86" + firefox: "93" + firefox_android: "93" + safari: "15.4" + safari_ios: "15.4" +compat_features: + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "1" + # firefox_android: "4" + # safari: "1" + # safari_ios: "1" + - api.DOMImplementation.createDocument + - api.DOMImplementation.createDocumentType + - api.Document + - api.Document.URL + - api.Document.cookie + - api.Document.createAttribute + - api.Document.createAttributeNS + - api.Document.createCDATASection + - api.Document.createComment + - api.Document.createDocumentFragment + - api.Document.createElement + - api.Document.createElementNS + - api.Document.createEvent + - api.Document.createProcessingInstruction + - api.Document.createRange + - api.Document.createTextNode + - api.Document.defaultView + - api.Document.doctype + - api.Document.documentElement + - api.Document.forms + - api.Document.getElementById + - api.Document.getElementsByName + - api.Document.getElementsByTagName + - api.Document.getElementsByTagNameNS + - api.Document.images + - api.Document.implementation + - api.Document.importNode + - api.Document.lastModified + - api.Document.links + - api.Document.referrer + - api.Document.title + - api.Document.write + - api.HTMLDocument + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "1" + # firefox_android: "4" + # safari: "1.2" + # safari_ios: "1" + - api.Document.designMode + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "1" + # firefox_android: "4" + # safari: "3" + # safari_ios: "1" + - api.Document.adoptNode + - api.Document.characterSet + - api.Document.createExpression + - api.Document.createNodeIterator + - api.Document.evaluate + - api.DocumentFragment + - api.DocumentType + - api.DocumentType.name + - api.DocumentType.publicId + - api.DocumentType.systemId + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "1" + # firefox_android: "4" + # safari: "3" + # safari_ios: "3" + - api.Document.createTreeWalker + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "1" + # firefox_android: "4" + # safari: "3.1" + # safari_ios: "2" + - api.Document.DOMContentLoaded_event + - api.Document.compatMode + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "3" + # firefox_android: "4" + # safari: "3.1" + # safari_ios: "2" + - api.Document.getElementsByClassName + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "3.5" + # firefox_android: "4" + # safari: "3.1" + # safari_ios: "2" + - api.Document.querySelector + - api.Document.querySelectorAll + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "3.6" + # firefox_android: "4" + # safari: "1" + # safari_ios: "1" + - api.Document.readyState + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "4" + # firefox_android: "4" + # safari: "1" + # safari_ios: "1" + - api.DOMImplementation.createHTMLDocument + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "6" + # firefox_android: "6" + # safari: "2" + # safari_ios: "1" + - api.Document.scroll_event + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "9" + # firefox_android: "9" + # safari: "3" + # safari_ios: "1" + - api.Document.scripts + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "2" + # chrome_android: "18" + # edge: "12" + # firefox: "3" + # firefox_android: "4" + # safari: "4" + # safari_ios: "3.2" + - api.Document.activeElement + - api.Document.hasFocus + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "2" + # chrome_android: "18" + # edge: "12" + # firefox: "3.5" + # firefox_android: "4" + # safari: "4" + # safari_ios: "3" + - api.DocumentFragment.querySelector + - api.DocumentFragment.querySelectorAll + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "4" + # chrome_android: "18" + # edge: "12" + # firefox: "4" + # firefox_android: "4" + # safari: "5" + # safari_ios: "4" + - api.Document.head + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "9" + # chrome_android: "18" + # edge: "12" + # firefox: "4" + # firefox_android: "4" + # safari: "5.1" + # safari_ios: "5" + - api.Document.readystatechange_event + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "24" + # chrome_android: "25" + # edge: "12" + # firefox: "23" + # firefox_android: "23" + # safari: "7" + # safari_ios: "7" + - api.DocumentType.remove + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "29" + # chrome_android: "29" + # edge: "12" + # firefox: "4" + # firefox_android: "4" + # safari: "8" + # safari_ios: "8" + - api.Document.currentScript + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "33" + # chrome_android: "33" + # edge: "12" + # firefox: "18" + # firefox_android: "18" + # safari: "7" + # safari_ios: "7" + - api.Document.hidden + - api.Document.visibilityState + + # baseline: high + # baseline_low_date: 2017-10-17 + # baseline_high_date: 2020-04-17 + # support: + # chrome: "29" + # chrome_android: "29" + # edge: "16" + # firefox: "25" + # firefox_android: "25" + # safari: "9" + # safari_ios: "9" + - api.Document.children + - api.DocumentFragment.children + + # baseline: high + # baseline_low_date: 2018-01-23 + # baseline_high_date: 2020-07-23 + # support: + # chrome: "64" + # chrome_android: "64" + # edge: "12" + # firefox: "1" + # firefox_android: "4" + # safari: "10.1" + # safari_ios: "10.3" + - api.Document.dir + - api.Document.embeds + - api.Document.plugins + + # baseline: high + # baseline_low_date: 2018-01-23 + # baseline_high_date: 2020-07-23 + # support: + # chrome: "64" + # chrome_android: "64" + # edge: "12" + # firefox: "1" + # firefox_android: "4" + # safari: "11" + # safari_ios: "11" + - api.Document.close + - api.Document.open + - api.Document.writeln + + # baseline: high + # baseline_low_date: 2018-04-30 + # baseline_high_date: 2020-10-30 + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "17" + # firefox: "1" + # firefox_android: "4" + # safari: "3" + # safari_ios: "1" + - api.Document.documentURI + + # baseline: high + # baseline_low_date: 2018-04-30 + # baseline_high_date: 2020-10-30 + # support: + # chrome: "29" + # chrome_android: "29" + # edge: "17" + # firefox: "24" + # firefox_android: "24" + # safari: "8" + # safari_ios: "8" + - api.DocumentFragment.DocumentFragment + + # baseline: high + # baseline_low_date: 2018-04-30 + # baseline_high_date: 2020-10-30 + # support: + # chrome: "29" + # chrome_android: "29" + # edge: "17" + # firefox: "25" + # firefox_android: "25" + # safari: "9" + # safari_ios: "9" + - api.Document.childElementCount + - api.Document.firstElementChild + - api.Document.lastElementChild + - api.DocumentFragment.childElementCount + - api.DocumentFragment.firstElementChild + - api.DocumentFragment.lastElementChild + + # baseline: high + # baseline_low_date: 2018-04-30 + # baseline_high_date: 2020-10-30 + # support: + # chrome: "36" + # chrome_android: "36" + # edge: "17" + # firefox: "1" + # firefox_android: "4" + # safari: "9" + # safari_ios: "9" + - api.Document.contentType + + # baseline: high + # baseline_low_date: 2018-04-30 + # baseline_high_date: 2020-10-30 + # support: + # chrome: "36" + # chrome_android: "36" + # edge: "17" + # firefox: "28" + # firefox_android: "28" + # safari: "9" + # safari_ios: "9" + - api.DocumentFragment.getElementById + + # baseline: high + # baseline_low_date: 2018-04-30 + # baseline_high_date: 2020-10-30 + # support: + # chrome: "54" + # chrome_android: "54" + # edge: "17" + # firefox: "49" + # firefox_android: "49" + # safari: "10" + # safari_ios: "10" + - api.Document.append + - api.Document.prepend + - api.DocumentFragment.append + - api.DocumentFragment.prepend + - api.DocumentType.after + - api.DocumentType.before + - api.DocumentType.replaceWith + + # baseline: high + # baseline_low_date: 2018-04-30 + # baseline_high_date: 2020-10-30 + # support: + # chrome: "60" + # chrome_android: "60" + # edge: "17" + # firefox: "20" + # firefox_android: "20" + # safari: "8" + # safari_ios: "8" + - api.Document.Document + + # baseline: high + # baseline_low_date: 2018-05-09 + # baseline_high_date: 2020-11-09 + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "60" + # firefox_android: "60" + # safari: "1" + # safari_ios: "1" + - api.Document.body + + # baseline: high + # baseline_low_date: 2020-10-20 + # baseline_high_date: 2023-04-20 + # support: + # chrome: "86" + # chrome_android: "86" + # edge: "86" + # firefox: "78" + # firefox_android: "79" + # safari: "14" + # safari_ios: "14" + - api.Document.replaceChildren + - api.DocumentFragment.replaceChildren + + # baseline: high + # baseline_low_date: 2021-04-26 + # baseline_high_date: 2023-10-26 + # support: + # chrome: "62" + # chrome_android: "62" + # edge: "18" + # firefox: "56" + # firefox_android: "56" + # safari: "14.1" + # safari_ios: "14.5" + - api.Document.visibilitychange_event + + # baseline: high + # baseline_low_date: 2022-03-14 + # baseline_high_date: 2024-09-14 + # support: + # chrome: "76" + # chrome_android: "76" + # edge: "79" + # firefox: "93" + # firefox_android: "93" + # safari: "15.4" + # safari_ios: "15.4" + - api.Document.securitypolicyviolation_event From 86a7fd2cf5537f6a0c637f0b579f7fa2515f64c0 Mon Sep 17 00:00:00 2001 From: dietrich ayala Date: Wed, 16 Oct 2024 22:25:22 +0700 Subject: [PATCH 02/13] comments --- features/document.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/features/document.yml b/features/document.yml index 4ffdee4bd27..b748006fd60 100644 --- a/features/document.yml +++ b/features/document.yml @@ -5,6 +5,18 @@ draft_date: 2024-09-30 name: Document description: "The Document interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree." spec: https://dom.spec.whatwg.org/#interface-document,https://html.spec.whatwg.org/multipage/dom.html#the-document-object,https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface,https://w3c.github.io/pointerlock/#extensions-to-the-document-interface,https://w3c.github.io/selection-api/#extensions-to-document-interface + +# Caniuse features containing "document" +# +# Document.execCommand() +# document.head +# document.elementFromPoint() +# Document Policy +# document.evaluate & XPath +# Document Object Model Range +# document.currentScript +# document.scrollingElement +# Node.compareDocumentPosition() #caniuse: #status: # compute_from: From 7b41d337df4b678c4c1de23ab42cdad5a3d0ffa8 Mon Sep 17 00:00:00 2001 From: dietrich ayala Date: Thu, 17 Oct 2024 14:40:34 +0700 Subject: [PATCH 03/13] moar --- features/document.yml | 54 ++++++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/features/document.yml b/features/document.yml index b748006fd60..dabc30ce82c 100644 --- a/features/document.yml +++ b/features/document.yml @@ -9,17 +9,42 @@ spec: https://dom.spec.whatwg.org/#interface-document,https://html.spec.whatwg.o # Caniuse features containing "document" # # Document.execCommand() +# https://caniuse.com/document-execcommand +# Document.execCommand() +# (deprecated) +# # document.head +# https://caniuse.com/documenthead +# # document.elementFromPoint() +# https://caniuse.com/element-from-point +# (baseline) +# # Document Policy +# https://caniuse.com/document-policy +# https://wicg.github.io/document-policy/ +# looks like not in BCD yet - would be an iframe attr and http headers +# # document.evaluate & XPath +# https://caniuse.com/document-evaluate-xpath +# # Document Object Model Range +# https://caniuse.com/dom-range +# # document.currentScript +# https://caniuse.com/document-currentscript +# # document.scrollingElement +# https://caniuse.com/document-scrollingelement +# # Node.compareDocumentPosition() +# https://caniuse.com/comparedocumentposition +# #caniuse: + #status: # compute_from: + compat_features: - api.Document - api.Document.DOMContentLoaded_event @@ -35,6 +60,7 @@ compat_features: - api.Document.forms - api.Document.getElementsByName - api.Document.hasFocus + # Caniuse: documenthead - api.Document.head - api.Document.hidden - api.Document.images @@ -61,17 +87,19 @@ compat_features: # spec: https://html.spec.whatwg.org/multipage/nav-history-apis.html#htmldocument - api.HTMLDocument - # from dom.yml + # From the DOM spec. + # Removed implementations of Element interface for now, as that'll be + # its own feature.. - api.DOMImplementation.createDocument - api.DOMImplementation.createDocumentType - api.DOMImplementation.createHTMLDocument - api.Document.Document - api.Document.URL - api.Document.adoptNode - - api.Document.append + #- api.Document.append - api.Document.characterSet - - api.Document.childElementCount - - api.Document.children + #- api.Document.childElementCount + #- api.Document.children - api.Document.compatMode - api.Document.contentType - api.Document.createAttribute @@ -92,18 +120,18 @@ compat_features: - api.Document.documentElement - api.Document.documentURI - api.Document.evaluate - - api.Document.firstElementChild + #- api.Document.firstElementChild - api.Document.getElementById - - api.Document.getElementsByClassName - - api.Document.getElementsByTagName - - api.Document.getElementsByTagNameNS + #- api.Document.getElementsByClassName + #- api.Document.getElementsByTagName + #- api.Document.getElementsByTagNameNS - api.Document.implementation - api.Document.importNode - - api.Document.lastElementChild - - api.Document.prepend - - api.Document.querySelector - - api.Document.querySelectorAll - - api.Document.replaceChildren + #- api.Document.lastElementChild + #- api.Document.prepend + #- api.Document.querySelector + #- api.Document.querySelectorAll + #- api.Document.replaceChildren - api.DocumentFragment - api.DocumentFragment.DocumentFragment - api.DocumentFragment.append From cac272c73a5f85b3104b2c1a72b16fd6e0d42ab0 Mon Sep 17 00:00:00 2001 From: dietrich ayala Date: Thu, 17 Oct 2024 15:01:30 +0700 Subject: [PATCH 04/13] more caniuse processing --- features/document.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/features/document.yml b/features/document.yml index dabc30ce82c..1231751647c 100644 --- a/features/document.yml +++ b/features/document.yml @@ -4,41 +4,55 @@ draft_date: 2024-09-30 name: Document description: "The Document interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree." -spec: https://dom.spec.whatwg.org/#interface-document,https://html.spec.whatwg.org/multipage/dom.html#the-document-object,https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface,https://w3c.github.io/pointerlock/#extensions-to-the-document-interface,https://w3c.github.io/selection-api/#extensions-to-document-interface +spec: + - https://dom.spec.whatwg.org/#interface-document + - https://html.spec.whatwg.org/multipage/dom.html#the-document-object + - https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface + - https://w3c.github.io/pointerlock/#extensions-to-the-document-interface + - https://w3c.github.io/selection-api/#extensions-to-document-interface -# Caniuse features containing "document" +# Caniuse does not have a `Document` feature. +# +# However, it has the following features containing "document": # # Document.execCommand() # https://caniuse.com/document-execcommand # Document.execCommand() -# (deprecated) +# key: api.Document.execCommand +# Action: deprecated # # document.head # https://caniuse.com/documenthead +# Action: either put in a Head feature or leave here # # document.elementFromPoint() # https://caniuse.com/element-from-point -# (baseline) +# Action: done in features/element-from-point.yml # # Document Policy # https://caniuse.com/document-policy # https://wicg.github.io/document-policy/ -# looks like not in BCD yet - would be an iframe attr and http headers +# Action: looks like not in BCD yet - would be an iframe attr and http headers # # document.evaluate & XPath # https://caniuse.com/document-evaluate-xpath +# Action: proposed to add to XPath feature in PR #1949 # # Document Object Model Range # https://caniuse.com/dom-range +# Action: will be separate feature in the DOM work # # document.currentScript # https://caniuse.com/document-currentscript +# Action: hmm kinda seems like could just stay here... # # document.scrollingElement # https://caniuse.com/document-scrollingelement +# Action: hmm kinda seems like could just stay here... # # Node.compareDocumentPosition() # https://caniuse.com/comparedocumentposition +# Action: seems like a standalone feature, possibly in a document or intra-document group # #caniuse: @@ -46,6 +60,7 @@ spec: https://dom.spec.whatwg.org/#interface-document,https://html.spec.whatwg.o # compute_from: compat_features: + # From the HTML spec - api.Document - api.Document.DOMContentLoaded_event - api.Document.activeElement From 23b1269d7371d9a57d282123d3b12aca27619051 Mon Sep 17 00:00:00 2001 From: dietrich ayala Date: Thu, 17 Oct 2024 15:15:14 +0700 Subject: [PATCH 05/13] break out document type and document fragment --- features/document-fragment.yml | 22 ++++ features/document-fragment.yml.dist | 124 ++++++++++++++++++++++ features/document-type.yml | 17 +++ features/document-type.yml.dist | 60 +++++++++++ features/document.yml | 27 +---- features/document.yml.dist | 159 +--------------------------- 6 files changed, 230 insertions(+), 179 deletions(-) create mode 100644 features/document-fragment.yml create mode 100644 features/document-fragment.yml.dist create mode 100644 features/document-type.yml create mode 100644 features/document-type.yml.dist diff --git a/features/document-fragment.yml b/features/document-fragment.yml new file mode 100644 index 00000000000..5f210824085 --- /dev/null +++ b/features/document-fragment.yml @@ -0,0 +1,22 @@ +# BCD: https://github.com/mdn/browser-compat-data/tree/main/api/Document.json +# MDN: https://developer.mozilla.org/docs/Web/API/Document +# CIU: https://caniuse.com/?search=Document +name: Document Fragment +description: "The Document interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree." +spec: https://dom.spec.whatwg.org/#interface-documentfragment +#status: +# compute_from: + +compat_features: + - api.DocumentFragment + - api.DocumentFragment.DocumentFragment + - api.DocumentFragment.append + - api.DocumentFragment.childElementCount + - api.DocumentFragment.children + - api.DocumentFragment.firstElementChild + - api.DocumentFragment.getElementById + - api.DocumentFragment.lastElementChild + - api.DocumentFragment.prepend + - api.DocumentFragment.querySelector + - api.DocumentFragment.querySelectorAll + - api.DocumentFragment.replaceChildren diff --git a/features/document-fragment.yml.dist b/features/document-fragment.yml.dist new file mode 100644 index 00000000000..2e6291f095f --- /dev/null +++ b/features/document-fragment.yml.dist @@ -0,0 +1,124 @@ +# Generated from: document-fragment.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: high + baseline_low_date: 2020-10-20 + baseline_high_date: 2023-04-20 + support: + chrome: "86" + chrome_android: "86" + edge: "86" + firefox: "78" + firefox_android: "79" + safari: "14" + safari_ios: "14" +compat_features: + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "1" + # firefox_android: "4" + # safari: "3" + # safari_ios: "1" + - api.DocumentFragment + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "2" + # chrome_android: "18" + # edge: "12" + # firefox: "3.5" + # firefox_android: "4" + # safari: "4" + # safari_ios: "3" + - api.DocumentFragment.querySelector + - api.DocumentFragment.querySelectorAll + + # baseline: high + # baseline_low_date: 2017-10-17 + # baseline_high_date: 2020-04-17 + # support: + # chrome: "29" + # chrome_android: "29" + # edge: "16" + # firefox: "25" + # firefox_android: "25" + # safari: "9" + # safari_ios: "9" + - api.DocumentFragment.children + + # baseline: high + # baseline_low_date: 2018-04-30 + # baseline_high_date: 2020-10-30 + # support: + # chrome: "29" + # chrome_android: "29" + # edge: "17" + # firefox: "24" + # firefox_android: "24" + # safari: "8" + # safari_ios: "8" + - api.DocumentFragment.DocumentFragment + + # baseline: high + # baseline_low_date: 2018-04-30 + # baseline_high_date: 2020-10-30 + # support: + # chrome: "29" + # chrome_android: "29" + # edge: "17" + # firefox: "25" + # firefox_android: "25" + # safari: "9" + # safari_ios: "9" + - api.DocumentFragment.childElementCount + - api.DocumentFragment.firstElementChild + - api.DocumentFragment.lastElementChild + + # baseline: high + # baseline_low_date: 2018-04-30 + # baseline_high_date: 2020-10-30 + # support: + # chrome: "36" + # chrome_android: "36" + # edge: "17" + # firefox: "28" + # firefox_android: "28" + # safari: "9" + # safari_ios: "9" + - api.DocumentFragment.getElementById + + # baseline: high + # baseline_low_date: 2018-04-30 + # baseline_high_date: 2020-10-30 + # support: + # chrome: "54" + # chrome_android: "54" + # edge: "17" + # firefox: "49" + # firefox_android: "49" + # safari: "10" + # safari_ios: "10" + - api.DocumentFragment.append + - api.DocumentFragment.prepend + + # ⬇️ Same status as overall feature ⬇️ + # baseline: high + # baseline_low_date: 2020-10-20 + # baseline_high_date: 2023-04-20 + # support: + # chrome: "86" + # chrome_android: "86" + # edge: "86" + # firefox: "78" + # firefox_android: "79" + # safari: "14" + # safari_ios: "14" + - api.DocumentFragment.replaceChildren diff --git a/features/document-type.yml b/features/document-type.yml new file mode 100644 index 00000000000..24feffac1f2 --- /dev/null +++ b/features/document-type.yml @@ -0,0 +1,17 @@ +# BCD: https://github.com/mdn/browser-compat-data/tree/main/api/Document.json +# MDN: https://developer.mozilla.org/docs/Web/API/Document +# CIU: https://caniuse.com/?search=Document +name: Document Type +description: "The Document interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree." +spec: https://dom.spec.whatwg.org/#interface-documenttype +#status: +# compute_from: +compat_features: + - api.DocumentType + - api.DocumentType.after + - api.DocumentType.before + - api.DocumentType.name + - api.DocumentType.publicId + - api.DocumentType.remove + - api.DocumentType.replaceWith + - api.DocumentType.systemId diff --git a/features/document-type.yml.dist b/features/document-type.yml.dist new file mode 100644 index 00000000000..36b5766f138 --- /dev/null +++ b/features/document-type.yml.dist @@ -0,0 +1,60 @@ +# Generated from: document-type.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: high + baseline_low_date: 2018-04-30 + baseline_high_date: 2020-10-30 + support: + chrome: "54" + chrome_android: "54" + edge: "17" + firefox: "49" + firefox_android: "49" + safari: "10" + safari_ios: "10" +compat_features: + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "1" + # firefox_android: "4" + # safari: "3" + # safari_ios: "1" + - api.DocumentType + - api.DocumentType.name + - api.DocumentType.publicId + - api.DocumentType.systemId + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "24" + # chrome_android: "25" + # edge: "12" + # firefox: "23" + # firefox_android: "23" + # safari: "7" + # safari_ios: "7" + - api.DocumentType.remove + + # ⬇️ Same status as overall feature ⬇️ + # baseline: high + # baseline_low_date: 2018-04-30 + # baseline_high_date: 2020-10-30 + # support: + # chrome: "54" + # chrome_android: "54" + # edge: "17" + # firefox: "49" + # firefox_android: "49" + # safari: "10" + # safari_ios: "10" + - api.DocumentType.after + - api.DocumentType.before + - api.DocumentType.replaceWith diff --git a/features/document.yml b/features/document.yml index 1231751647c..72c8c9b2314 100644 --- a/features/document.yml +++ b/features/document.yml @@ -1,15 +1,14 @@ # BCD: https://github.com/mdn/browser-compat-data/tree/main/api/Document.json # MDN: https://developer.mozilla.org/docs/Web/API/Document # CIU: https://caniuse.com/?search=Document -draft_date: 2024-09-30 name: Document description: "The Document interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree." spec: - https://dom.spec.whatwg.org/#interface-document - https://html.spec.whatwg.org/multipage/dom.html#the-document-object - - https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface - - https://w3c.github.io/pointerlock/#extensions-to-the-document-interface - - https://w3c.github.io/selection-api/#extensions-to-document-interface + #- https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface + #- https://w3c.github.io/pointerlock/#extensions-to-the-document-interface + #- https://w3c.github.io/selection-api/#extensions-to-document-interface # Caniuse does not have a `Document` feature. # @@ -147,23 +146,3 @@ compat_features: #- api.Document.querySelector #- api.Document.querySelectorAll #- api.Document.replaceChildren - - api.DocumentFragment - - api.DocumentFragment.DocumentFragment - - api.DocumentFragment.append - - api.DocumentFragment.childElementCount - - api.DocumentFragment.children - - api.DocumentFragment.firstElementChild - - api.DocumentFragment.getElementById - - api.DocumentFragment.lastElementChild - - api.DocumentFragment.prepend - - api.DocumentFragment.querySelector - - api.DocumentFragment.querySelectorAll - - api.DocumentFragment.replaceChildren - - api.DocumentType - - api.DocumentType.after - - api.DocumentType.before - - api.DocumentType.name - - api.DocumentType.publicId - - api.DocumentType.remove - - api.DocumentType.replaceWith - - api.DocumentType.systemId diff --git a/features/document.yml.dist b/features/document.yml.dist index d8a211a8f28..cbe05a707e3 100644 --- a/features/document.yml.dist +++ b/features/document.yml.dist @@ -6,9 +6,9 @@ status: baseline_low_date: 2022-03-14 baseline_high_date: 2024-09-14 support: - chrome: "86" - chrome_android: "86" - edge: "86" + chrome: "76" + chrome_android: "76" + edge: "79" firefox: "93" firefox_android: "93" safari: "15.4" @@ -47,8 +47,6 @@ compat_features: - api.Document.forms - api.Document.getElementById - api.Document.getElementsByName - - api.Document.getElementsByTagName - - api.Document.getElementsByTagNameNS - api.Document.images - api.Document.implementation - api.Document.importNode @@ -88,11 +86,6 @@ compat_features: - api.Document.createExpression - api.Document.createNodeIterator - api.Document.evaluate - - api.DocumentFragment - - api.DocumentType - - api.DocumentType.name - - api.DocumentType.publicId - - api.DocumentType.systemId # baseline: high # baseline_low_date: 2015-07-29 @@ -121,33 +114,6 @@ compat_features: - api.Document.DOMContentLoaded_event - api.Document.compatMode - # baseline: high - # baseline_low_date: 2015-07-29 - # baseline_high_date: 2018-01-29 - # support: - # chrome: "1" - # chrome_android: "18" - # edge: "12" - # firefox: "3" - # firefox_android: "4" - # safari: "3.1" - # safari_ios: "2" - - api.Document.getElementsByClassName - - # baseline: high - # baseline_low_date: 2015-07-29 - # baseline_high_date: 2018-01-29 - # support: - # chrome: "1" - # chrome_android: "18" - # edge: "12" - # firefox: "3.5" - # firefox_android: "4" - # safari: "3.1" - # safari_ios: "2" - - api.Document.querySelector - - api.Document.querySelectorAll - # baseline: high # baseline_low_date: 2015-07-29 # baseline_high_date: 2018-01-29 @@ -214,20 +180,6 @@ compat_features: - api.Document.activeElement - api.Document.hasFocus - # baseline: high - # baseline_low_date: 2015-07-29 - # baseline_high_date: 2018-01-29 - # support: - # chrome: "2" - # chrome_android: "18" - # edge: "12" - # firefox: "3.5" - # firefox_android: "4" - # safari: "4" - # safari_ios: "3" - - api.DocumentFragment.querySelector - - api.DocumentFragment.querySelectorAll - # baseline: high # baseline_low_date: 2015-07-29 # baseline_high_date: 2018-01-29 @@ -254,19 +206,6 @@ compat_features: # safari_ios: "5" - api.Document.readystatechange_event - # baseline: high - # baseline_low_date: 2015-07-29 - # baseline_high_date: 2018-01-29 - # support: - # chrome: "24" - # chrome_android: "25" - # edge: "12" - # firefox: "23" - # firefox_android: "23" - # safari: "7" - # safari_ios: "7" - - api.DocumentType.remove - # baseline: high # baseline_low_date: 2015-07-29 # baseline_high_date: 2018-01-29 @@ -294,20 +233,6 @@ compat_features: - api.Document.hidden - api.Document.visibilityState - # baseline: high - # baseline_low_date: 2017-10-17 - # baseline_high_date: 2020-04-17 - # support: - # chrome: "29" - # chrome_android: "29" - # edge: "16" - # firefox: "25" - # firefox_android: "25" - # safari: "9" - # safari_ios: "9" - - api.Document.children - - api.DocumentFragment.children - # baseline: high # baseline_low_date: 2018-01-23 # baseline_high_date: 2020-07-23 @@ -351,37 +276,6 @@ compat_features: # safari_ios: "1" - api.Document.documentURI - # baseline: high - # baseline_low_date: 2018-04-30 - # baseline_high_date: 2020-10-30 - # support: - # chrome: "29" - # chrome_android: "29" - # edge: "17" - # firefox: "24" - # firefox_android: "24" - # safari: "8" - # safari_ios: "8" - - api.DocumentFragment.DocumentFragment - - # baseline: high - # baseline_low_date: 2018-04-30 - # baseline_high_date: 2020-10-30 - # support: - # chrome: "29" - # chrome_android: "29" - # edge: "17" - # firefox: "25" - # firefox_android: "25" - # safari: "9" - # safari_ios: "9" - - api.Document.childElementCount - - api.Document.firstElementChild - - api.Document.lastElementChild - - api.DocumentFragment.childElementCount - - api.DocumentFragment.firstElementChild - - api.DocumentFragment.lastElementChild - # baseline: high # baseline_low_date: 2018-04-30 # baseline_high_date: 2020-10-30 @@ -395,38 +289,6 @@ compat_features: # safari_ios: "9" - api.Document.contentType - # baseline: high - # baseline_low_date: 2018-04-30 - # baseline_high_date: 2020-10-30 - # support: - # chrome: "36" - # chrome_android: "36" - # edge: "17" - # firefox: "28" - # firefox_android: "28" - # safari: "9" - # safari_ios: "9" - - api.DocumentFragment.getElementById - - # baseline: high - # baseline_low_date: 2018-04-30 - # baseline_high_date: 2020-10-30 - # support: - # chrome: "54" - # chrome_android: "54" - # edge: "17" - # firefox: "49" - # firefox_android: "49" - # safari: "10" - # safari_ios: "10" - - api.Document.append - - api.Document.prepend - - api.DocumentFragment.append - - api.DocumentFragment.prepend - - api.DocumentType.after - - api.DocumentType.before - - api.DocumentType.replaceWith - # baseline: high # baseline_low_date: 2018-04-30 # baseline_high_date: 2020-10-30 @@ -453,20 +315,6 @@ compat_features: # safari_ios: "1" - api.Document.body - # baseline: high - # baseline_low_date: 2020-10-20 - # baseline_high_date: 2023-04-20 - # support: - # chrome: "86" - # chrome_android: "86" - # edge: "86" - # firefox: "78" - # firefox_android: "79" - # safari: "14" - # safari_ios: "14" - - api.Document.replaceChildren - - api.DocumentFragment.replaceChildren - # baseline: high # baseline_low_date: 2021-04-26 # baseline_high_date: 2023-10-26 @@ -480,6 +328,7 @@ compat_features: # safari_ios: "14.5" - api.Document.visibilitychange_event + # ⬇️ Same status as overall feature ⬇️ # baseline: high # baseline_low_date: 2022-03-14 # baseline_high_date: 2024-09-14 From d941938a337fb3383c22d0e1f7efaafb6876a8ac Mon Sep 17 00:00:00 2001 From: dietrich ayala Date: Thu, 17 Oct 2024 15:16:43 +0700 Subject: [PATCH 06/13] remove evaluate --- features/document.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/features/document.yml b/features/document.yml index 72c8c9b2314..c2b56b142b6 100644 --- a/features/document.yml +++ b/features/document.yml @@ -133,7 +133,10 @@ compat_features: - api.Document.doctype - api.Document.documentElement - api.Document.documentURI + + # proposed in #1949 - api.Document.evaluate + #- api.Document.firstElementChild - api.Document.getElementById #- api.Document.getElementsByClassName From 632db9b0b3066ab8ecf728529a7a5d8229faba58 Mon Sep 17 00:00:00 2001 From: dietrich ayala Date: Fri, 18 Oct 2024 09:26:59 +0700 Subject: [PATCH 07/13] keep in node apis --- features/document.yml | 47 +++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/features/document.yml b/features/document.yml index c2b56b142b6..8764cddd045 100644 --- a/features/document.yml +++ b/features/document.yml @@ -20,22 +20,11 @@ spec: # key: api.Document.execCommand # Action: deprecated # -# document.head -# https://caniuse.com/documenthead -# Action: either put in a Head feature or leave here -# -# document.elementFromPoint() -# https://caniuse.com/element-from-point -# Action: done in features/element-from-point.yml -# # Document Policy # https://caniuse.com/document-policy # https://wicg.github.io/document-policy/ # Action: looks like not in BCD yet - would be an iframe attr and http headers # -# document.evaluate & XPath -# https://caniuse.com/document-evaluate-xpath -# Action: proposed to add to XPath feature in PR #1949 # # Document Object Model Range # https://caniuse.com/dom-range @@ -74,7 +63,9 @@ compat_features: - api.Document.forms - api.Document.getElementsByName - api.Document.hasFocus - # Caniuse: documenthead + # document.head + # https://caniuse.com/documenthead + # TBD: either put in a Head feature or leave here - api.Document.head - api.Document.hidden - api.Document.images @@ -102,18 +93,16 @@ compat_features: - api.HTMLDocument # From the DOM spec. - # Removed implementations of Element interface for now, as that'll be - # its own feature.. - api.DOMImplementation.createDocument - api.DOMImplementation.createDocumentType - api.DOMImplementation.createHTMLDocument - api.Document.Document - api.Document.URL - api.Document.adoptNode - #- api.Document.append + - api.Document.append - api.Document.characterSet - #- api.Document.childElementCount - #- api.Document.children + - api.Document.childElementCount + - api.Document.children - api.Document.compatMode - api.Document.contentType - api.Document.createAttribute @@ -134,18 +123,20 @@ compat_features: - api.Document.documentElement - api.Document.documentURI - # proposed in #1949 - - api.Document.evaluate + # https://caniuse.com/document-evaluate-xpath + # "document.evaluate & XPath" + # Action: proposed to add to XPath feature in PR #1949 + #- api.Document.evaluate - #- api.Document.firstElementChild + - api.Document.firstElementChild - api.Document.getElementById - #- api.Document.getElementsByClassName - #- api.Document.getElementsByTagName - #- api.Document.getElementsByTagNameNS + - api.Document.getElementsByClassName + - api.Document.getElementsByTagName + - api.Document.getElementsByTagNameNS - api.Document.implementation - api.Document.importNode - #- api.Document.lastElementChild - #- api.Document.prepend - #- api.Document.querySelector - #- api.Document.querySelectorAll - #- api.Document.replaceChildren + - api.Document.lastElementChild + - api.Document.prepend + - api.Document.querySelector + - api.Document.querySelectorAll + - api.Document.replaceChildren From 07a63c59bc892eb3fa86370e07fdeb7e492fd2dc Mon Sep 17 00:00:00 2001 From: dietrich ayala Date: Fri, 18 Oct 2024 10:06:24 +0700 Subject: [PATCH 08/13] add xml doc --- features/document.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/features/document.yml b/features/document.yml index 8764cddd045..629c64e8b62 100644 --- a/features/document.yml +++ b/features/document.yml @@ -140,3 +140,5 @@ compat_features: - api.Document.querySelector - api.Document.querySelectorAll - api.Document.replaceChildren + + - api.XMLDocument From 06ef5ba50beb9a2177d9b24f08b99500ea7c2f92 Mon Sep 17 00:00:00 2001 From: dietrich ayala Date: Fri, 18 Oct 2024 10:07:40 +0700 Subject: [PATCH 09/13] redist --- features/document.yml.dist | 105 +++++++++++++++++++++++++++++++++++-- 1 file changed, 100 insertions(+), 5 deletions(-) diff --git a/features/document.yml.dist b/features/document.yml.dist index cbe05a707e3..f1296a42f48 100644 --- a/features/document.yml.dist +++ b/features/document.yml.dist @@ -6,9 +6,9 @@ status: baseline_low_date: 2022-03-14 baseline_high_date: 2024-09-14 support: - chrome: "76" - chrome_android: "76" - edge: "79" + chrome: "86" + chrome_android: "86" + edge: "86" firefox: "93" firefox_android: "93" safari: "15.4" @@ -47,6 +47,8 @@ compat_features: - api.Document.forms - api.Document.getElementById - api.Document.getElementsByName + - api.Document.getElementsByTagName + - api.Document.getElementsByTagNameNS - api.Document.images - api.Document.implementation - api.Document.importNode @@ -85,7 +87,6 @@ compat_features: - api.Document.characterSet - api.Document.createExpression - api.Document.createNodeIterator - - api.Document.evaluate # baseline: high # baseline_low_date: 2015-07-29 @@ -114,6 +115,33 @@ compat_features: - api.Document.DOMContentLoaded_event - api.Document.compatMode + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "3" + # firefox_android: "4" + # safari: "3.1" + # safari_ios: "2" + - api.Document.getElementsByClassName + + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "3.5" + # firefox_android: "4" + # safari: "3.1" + # safari_ios: "2" + - api.Document.querySelector + - api.Document.querySelectorAll + # baseline: high # baseline_low_date: 2015-07-29 # baseline_high_date: 2018-01-29 @@ -233,6 +261,32 @@ compat_features: - api.Document.hidden - api.Document.visibilityState + # baseline: high + # baseline_low_date: 2016-09-20 + # baseline_high_date: 2019-03-20 + # support: + # chrome: "34" + # chrome_android: "34" + # edge: "12" + # firefox: "1" + # firefox_android: "4" + # safari: "10" + # safari_ios: "10" + - api.XMLDocument + + # baseline: high + # baseline_low_date: 2017-10-17 + # baseline_high_date: 2020-04-17 + # support: + # chrome: "29" + # chrome_android: "29" + # edge: "16" + # firefox: "25" + # firefox_android: "25" + # safari: "9" + # safari_ios: "9" + - api.Document.children + # baseline: high # baseline_low_date: 2018-01-23 # baseline_high_date: 2020-07-23 @@ -276,6 +330,21 @@ compat_features: # safari_ios: "1" - api.Document.documentURI + # baseline: high + # baseline_low_date: 2018-04-30 + # baseline_high_date: 2020-10-30 + # support: + # chrome: "29" + # chrome_android: "29" + # edge: "17" + # firefox: "25" + # firefox_android: "25" + # safari: "9" + # safari_ios: "9" + - api.Document.childElementCount + - api.Document.firstElementChild + - api.Document.lastElementChild + # baseline: high # baseline_low_date: 2018-04-30 # baseline_high_date: 2020-10-30 @@ -289,6 +358,20 @@ compat_features: # safari_ios: "9" - api.Document.contentType + # baseline: high + # baseline_low_date: 2018-04-30 + # baseline_high_date: 2020-10-30 + # support: + # chrome: "54" + # chrome_android: "54" + # edge: "17" + # firefox: "49" + # firefox_android: "49" + # safari: "10" + # safari_ios: "10" + - api.Document.append + - api.Document.prepend + # baseline: high # baseline_low_date: 2018-04-30 # baseline_high_date: 2020-10-30 @@ -315,6 +398,19 @@ compat_features: # safari_ios: "1" - api.Document.body + # baseline: high + # baseline_low_date: 2020-10-20 + # baseline_high_date: 2023-04-20 + # support: + # chrome: "86" + # chrome_android: "86" + # edge: "86" + # firefox: "78" + # firefox_android: "79" + # safari: "14" + # safari_ios: "14" + - api.Document.replaceChildren + # baseline: high # baseline_low_date: 2021-04-26 # baseline_high_date: 2023-10-26 @@ -328,7 +424,6 @@ compat_features: # safari_ios: "14.5" - api.Document.visibilitychange_event - # ⬇️ Same status as overall feature ⬇️ # baseline: high # baseline_low_date: 2022-03-14 # baseline_high_date: 2024-09-14 From 82b16e2e8ffe271fe7893175b6b733f035da95b8 Mon Sep 17 00:00:00 2001 From: dietrich ayala Date: Fri, 18 Oct 2024 11:28:52 +0700 Subject: [PATCH 10/13] more cleanup --- features/document.yml | 94 +++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 52 deletions(-) diff --git a/features/document.yml b/features/document.yml index 629c64e8b62..6392194297e 100644 --- a/features/document.yml +++ b/features/document.yml @@ -1,15 +1,21 @@ # BCD: https://github.com/mdn/browser-compat-data/tree/main/api/Document.json # MDN: https://developer.mozilla.org/docs/Web/API/Document # CIU: https://caniuse.com/?search=Document +# BCD: https://github.com/mdn/browser-compat-data/tree/main/api/HTMLDocument.json +# MDN: https://developer.mozilla.org/docs/Web/API/HTMLDocument +# CIU: https://caniuse.com/?search=HTMLDocument +# description: "For historical reasons, Window objects have a window.HTMLDocument property whose value is the Document interface. So you can think of HTMLDocument as an alias for Document, and you can find documentation for HTMLDocument members under the documentation for the Document interface." name: Document description: "The Document interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree." spec: - https://dom.spec.whatwg.org/#interface-document - https://html.spec.whatwg.org/multipage/dom.html#the-document-object + - https://html.spec.whatwg.org/multipage/nav-history-apis.html#htmldocument #- https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface #- https://w3c.github.io/pointerlock/#extensions-to-the-document-interface #- https://w3c.github.io/selection-api/#extensions-to-document-interface + # Caniuse does not have a `Document` feature. # # However, it has the following features containing "document": @@ -48,63 +54,24 @@ spec: # compute_from: compat_features: - # From the HTML spec - - api.Document - - api.Document.DOMContentLoaded_event - - api.Document.activeElement - - api.Document.body - - api.Document.close - - api.Document.cookie - - api.Document.currentScript - - api.Document.defaultView - - api.Document.designMode - - api.Document.dir - - api.Document.embeds - - api.Document.forms - - api.Document.getElementsByName - - api.Document.hasFocus - # document.head - # https://caniuse.com/documenthead - # TBD: either put in a Head feature or leave here - - api.Document.head - - api.Document.hidden - - api.Document.images - - api.Document.lastModified - - api.Document.links - - api.Document.open - - api.Document.plugins - - api.Document.readyState - - api.Document.readystatechange_event - - api.Document.referrer - - api.Document.scripts - - api.Document.scroll_event - - api.Document.securitypolicyviolation_event - - api.Document.title - - api.Document.visibilityState - - api.Document.visibilitychange_event - - api.Document.write - - api.Document.writeln - - # BCD: https://github.com/mdn/browser-compat-data/tree/main/api/HTMLDocument.json - # MDN: https://developer.mozilla.org/docs/Web/API/HTMLDocument - # CIU: https://caniuse.com/?search=HTMLDocument - # description: "For historical reasons, Window objects have a window.HTMLDocument property whose value is the Document interface. So you can think of HTMLDocument as an alias for Document, and you can find documentation for HTMLDocument members under the documentation for the Document interface." - # spec: https://html.spec.whatwg.org/multipage/nav-history-apis.html#htmldocument - - api.HTMLDocument - - # From the DOM spec. - api.DOMImplementation.createDocument - api.DOMImplementation.createDocumentType - api.DOMImplementation.createHTMLDocument + - api.Document + - api.Document.DOMContentLoaded_event - api.Document.Document - api.Document.URL + - api.Document.activeElement - api.Document.adoptNode - api.Document.append + - api.Document.body - api.Document.characterSet - api.Document.childElementCount - api.Document.children + - api.Document.close - api.Document.compatMode - api.Document.contentType + - api.Document.cookie - api.Document.createAttribute - api.Document.createAttributeNS - api.Document.createCDATASection @@ -119,26 +86,49 @@ compat_features: - api.Document.createRange - api.Document.createTextNode - api.Document.createTreeWalker + - api.Document.currentScript + - api.Document.defaultView + - api.Document.designMode + - api.Document.dir - api.Document.doctype - api.Document.documentElement - api.Document.documentURI - - # https://caniuse.com/document-evaluate-xpath - # "document.evaluate & XPath" - # Action: proposed to add to XPath feature in PR #1949 - #- api.Document.evaluate - + - api.Document.embeds - api.Document.firstElementChild + - api.Document.forms - api.Document.getElementById - api.Document.getElementsByClassName + - api.Document.getElementsByName - api.Document.getElementsByTagName - api.Document.getElementsByTagNameNS + - api.Document.hasFocus + # document.head + # https://caniuse.com/documenthead + # TBD: either put in a Head feature or leave here + - api.Document.head + - api.Document.hidden + - api.Document.images - api.Document.implementation - api.Document.importNode - api.Document.lastElementChild + - api.Document.lastModified + - api.Document.links + - api.Document.open + - api.Document.plugins - api.Document.prepend - api.Document.querySelector - api.Document.querySelectorAll + - api.Document.readyState + - api.Document.readystatechange_event + - api.Document.referrer - api.Document.replaceChildren - + - api.Document.scripts + - api.Document.scroll_event + - api.Document.securitypolicyviolation_event + - api.Document.title + - api.Document.visibilityState + - api.Document.visibilitychange_event + - api.Document.write + - api.Document.writeln + - api.HTMLDocument - api.XMLDocument From df34652063abe536332a2d9eae27f61f140e8ed9 Mon Sep 17 00:00:00 2001 From: dietrich ayala Date: Fri, 18 Oct 2024 11:29:46 +0700 Subject: [PATCH 11/13] pretty --- features/document.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/features/document.yml b/features/document.yml index 6392194297e..bd2c17637bf 100644 --- a/features/document.yml +++ b/features/document.yml @@ -15,7 +15,6 @@ spec: #- https://w3c.github.io/pointerlock/#extensions-to-the-document-interface #- https://w3c.github.io/selection-api/#extensions-to-document-interface - # Caniuse does not have a `Document` feature. # # However, it has the following features containing "document": From 05bcc45738a2eed38376baa4649a1eb724c0df07 Mon Sep 17 00:00:00 2001 From: dietrich ayala Date: Fri, 18 Oct 2024 15:14:22 +0700 Subject: [PATCH 12/13] rename doctype, more cleanup and desc fixes --- features/doctype.yml | 13 +++++++++++++ ...{document-type.yml.dist => doctype.yml.dist} | 15 ++++++++++++++- features/document-fragment.yml | 8 +------- features/document-type.yml | 17 ----------------- 4 files changed, 28 insertions(+), 25 deletions(-) create mode 100644 features/doctype.yml rename features/{document-type.yml.dist => doctype.yml.dist} (81%) delete mode 100644 features/document-type.yml diff --git a/features/doctype.yml b/features/doctype.yml new file mode 100644 index 00000000000..4f8839f53b7 --- /dev/null +++ b/features/doctype.yml @@ -0,0 +1,13 @@ +name: Document Type +description: "A document's `doctype` is a read-only property representing the Document Type Declaration (DTD) associated with the current document." +spec: https://dom.spec.whatwg.org/#interface-documenttype +compat_features: + - api.Document.doctype + - api.DocumentType + - api.DocumentType.after + - api.DocumentType.before + - api.DocumentType.name + - api.DocumentType.publicId + - api.DocumentType.remove + - api.DocumentType.replaceWith + - api.DocumentType.systemId diff --git a/features/document-type.yml.dist b/features/doctype.yml.dist similarity index 81% rename from features/document-type.yml.dist rename to features/doctype.yml.dist index 36b5766f138..c401d146164 100644 --- a/features/document-type.yml.dist +++ b/features/doctype.yml.dist @@ -1,4 +1,4 @@ -# Generated from: document-type.yml +# Generated from: doctype.yml # Do not edit this file by hand. Edit the source file instead! status: @@ -14,6 +14,19 @@ status: safari: "10" safari_ios: "10" compat_features: + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "1" + # firefox_android: "4" + # safari: "1" + # safari_ios: "1" + - api.Document.doctype + # baseline: high # baseline_low_date: 2015-07-29 # baseline_high_date: 2018-01-29 diff --git a/features/document-fragment.yml b/features/document-fragment.yml index 5f210824085..83abf21be0d 100644 --- a/features/document-fragment.yml +++ b/features/document-fragment.yml @@ -1,12 +1,6 @@ -# BCD: https://github.com/mdn/browser-compat-data/tree/main/api/Document.json -# MDN: https://developer.mozilla.org/docs/Web/API/Document -# CIU: https://caniuse.com/?search=Document name: Document Fragment -description: "The Document interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree." +description: "A `DocumentFragment` is a minimal document object that has no parent. It is a lightweight version of `Document` that stores a segment of a document structure comprised of nodes just like a standard document, but isn't part of the active document." spec: https://dom.spec.whatwg.org/#interface-documentfragment -#status: -# compute_from: - compat_features: - api.DocumentFragment - api.DocumentFragment.DocumentFragment diff --git a/features/document-type.yml b/features/document-type.yml deleted file mode 100644 index 24feffac1f2..00000000000 --- a/features/document-type.yml +++ /dev/null @@ -1,17 +0,0 @@ -# BCD: https://github.com/mdn/browser-compat-data/tree/main/api/Document.json -# MDN: https://developer.mozilla.org/docs/Web/API/Document -# CIU: https://caniuse.com/?search=Document -name: Document Type -description: "The Document interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree." -spec: https://dom.spec.whatwg.org/#interface-documenttype -#status: -# compute_from: -compat_features: - - api.DocumentType - - api.DocumentType.after - - api.DocumentType.before - - api.DocumentType.name - - api.DocumentType.publicId - - api.DocumentType.remove - - api.DocumentType.replaceWith - - api.DocumentType.systemId From 29d1a1d6500560245bb3c136e69742b307ea446f Mon Sep 17 00:00:00 2001 From: dietrich ayala Date: Fri, 18 Oct 2024 16:10:38 +0700 Subject: [PATCH 13/13] more cleanup --- features/document.yml | 60 ++++++++------------------------------ features/document.yml.dist | 1 - 2 files changed, 12 insertions(+), 49 deletions(-) diff --git a/features/document.yml b/features/document.yml index bd2c17637bf..016107fae87 100644 --- a/features/document.yml +++ b/features/document.yml @@ -1,56 +1,24 @@ -# BCD: https://github.com/mdn/browser-compat-data/tree/main/api/Document.json -# MDN: https://developer.mozilla.org/docs/Web/API/Document -# CIU: https://caniuse.com/?search=Document -# BCD: https://github.com/mdn/browser-compat-data/tree/main/api/HTMLDocument.json -# MDN: https://developer.mozilla.org/docs/Web/API/HTMLDocument -# CIU: https://caniuse.com/?search=HTMLDocument -# description: "For historical reasons, Window objects have a window.HTMLDocument property whose value is the Document interface. So you can think of HTMLDocument as an alias for Document, and you can find documentation for HTMLDocument members under the documentation for the Document interface." name: Document -description: "The Document interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree." +description: "The `document` object represents a loaded web page, and is an entry point into the page's content, through the DOM tree. It provides functionality globally to the page, such as access to the page's URL and ways to create new elements in the document." spec: - https://dom.spec.whatwg.org/#interface-document - https://html.spec.whatwg.org/multipage/dom.html#the-document-object - - https://html.spec.whatwg.org/multipage/nav-history-apis.html#htmldocument - #- https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface - #- https://w3c.github.io/pointerlock/#extensions-to-the-document-interface - #- https://w3c.github.io/selection-api/#extensions-to-document-interface -# Caniuse does not have a `Document` feature. +# Caniuse does not have a `Document` feature but does have the following: # -# However, it has the following features containing "document": -# -# Document.execCommand() -# https://caniuse.com/document-execcommand -# Document.execCommand() -# key: api.Document.execCommand -# Action: deprecated -# -# Document Policy -# https://caniuse.com/document-policy -# https://wicg.github.io/document-policy/ -# Action: looks like not in BCD yet - would be an iframe attr and http headers -# -# -# Document Object Model Range -# https://caniuse.com/dom-range -# Action: will be separate feature in the DOM work -# -# document.currentScript +# - api.Document.currentScript # https://caniuse.com/document-currentscript -# Action: hmm kinda seems like could just stay here... +# Seems odd to have as a standalone feature. +# We could either leave it here and have multiple keys for `caniuse`, +# or make a separate feature. # -# document.scrollingElement -# https://caniuse.com/document-scrollingelement -# Action: hmm kinda seems like could just stay here... -# -# Node.compareDocumentPosition() -# https://caniuse.com/comparedocumentposition -# Action: seems like a standalone feature, possibly in a document or intra-document group +# - api.Document.head +# https://caniuse.com/documenthead +# This should go in a standalone feature for the tag. # -#caniuse: - -#status: -# compute_from: +# - api.Document.scrollingElement +# https://caniuse.com/document-scrollingelement +# This is in CSSOM spec, which seems a right home for it. compat_features: - api.DOMImplementation.createDocument @@ -89,7 +57,6 @@ compat_features: - api.Document.defaultView - api.Document.designMode - api.Document.dir - - api.Document.doctype - api.Document.documentElement - api.Document.documentURI - api.Document.embeds @@ -101,9 +68,6 @@ compat_features: - api.Document.getElementsByTagName - api.Document.getElementsByTagNameNS - api.Document.hasFocus - # document.head - # https://caniuse.com/documenthead - # TBD: either put in a Head feature or leave here - api.Document.head - api.Document.hidden - api.Document.images diff --git a/features/document.yml.dist b/features/document.yml.dist index f1296a42f48..5934de83b62 100644 --- a/features/document.yml.dist +++ b/features/document.yml.dist @@ -42,7 +42,6 @@ compat_features: - api.Document.createRange - api.Document.createTextNode - api.Document.defaultView - - api.Document.doctype - api.Document.documentElement - api.Document.forms - api.Document.getElementById