From 8a09ef437ef45fe71e94d992ced596aa9d26749c Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Wed, 12 Feb 2025 15:21:59 +0100 Subject: [PATCH 1/6] document.write() feature --- features/document-write.yml | 15 ++++++++++++ features/document-write.yml.dist | 40 ++++++++++++++++++++++++++++++++ features/dom.yml | 3 --- features/dom.yml.dist | 15 ------------ 4 files changed, 55 insertions(+), 18 deletions(-) create mode 100644 features/document-write.yml create mode 100644 features/document-write.yml.dist diff --git a/features/document-write.yml b/features/document-write.yml new file mode 100644 index 00000000000..177fd7a7705 --- /dev/null +++ b/features/document-write.yml @@ -0,0 +1,15 @@ +name: document.write() +description: The `document.open()`, `document.write()`, `document.writeln()`, and `document.close()` methods write content to a document, possibly while that document is still loading. +spec: https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html +discouraged: + # The spec doesn't actually discourages against open and close, but these methods are + # really only useful for writing anyway, so we're marking the whole feature as discouraged. + according_to: + - https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#document.write() + alternatives: + - dom +compat_features: + - api.Document.write + - api.Document.writeln + - api.Document.open + - api.Document.close diff --git a/features/document-write.yml.dist b/features/document-write.yml.dist new file mode 100644 index 00000000000..b8cc8b6aac8 --- /dev/null +++ b/features/document-write.yml.dist @@ -0,0 +1,40 @@ +# Generated from: document-write.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: false + support: + chrome: "45" + chrome_android: "45" + edge: "12" + firefox: "69" + firefox_android: "79" + safari: "11" + safari_ios: "11" +compat_features: + # baseline: high + # baseline_low_date: 2020-07-28 + # baseline_high_date: 2023-01-28 + # support: + # chrome: "45" + # chrome_android: "45" + # edge: "12" + # firefox: "69" + # firefox_android: "79" + # safari: "11" + # safari_ios: "11" + - api.Document.close + - api.Document.open + - api.Document.writeln + + # ⬇️ Same status as overall feature ⬇️ + # baseline: false + # support: + # chrome: "45" + # chrome_android: "45" + # edge: "12" + # firefox: "69" + # firefox_android: "79" + # safari: "11" + # safari_ios: "11" + - api.Document.write diff --git a/features/dom.yml b/features/dom.yml index b1b43bedefa..5bad36f79d0 100644 --- a/features/dom.yml +++ b/features/dom.yml @@ -73,7 +73,6 @@ compat_features: - api.Document.characterSet - api.Document.childElementCount - api.Document.children - - api.Document.close - api.Document.compatMode - api.Document.contentType - api.Document.createAttribute @@ -113,7 +112,6 @@ compat_features: - api.Document.lastElementChild - api.Document.lastModified - api.Document.links - - api.Document.open - api.Document.plugins - api.Document.prepend - api.Document.querySelector @@ -124,7 +122,6 @@ compat_features: - api.Document.replaceChildren - api.Document.scripts - api.Document.title - - api.Document.writeln - api.DocumentFragment - api.DocumentFragment.DocumentFragment - api.DocumentFragment.append diff --git a/features/dom.yml.dist b/features/dom.yml.dist index 4a5e8355fc2..77e5a0222ea 100644 --- a/features/dom.yml.dist +++ b/features/dom.yml.dist @@ -1265,21 +1265,6 @@ compat_features: # safari_ios: "10.3" - api.Document.designMode - # baseline: high - # baseline_low_date: 2020-07-28 - # baseline_high_date: 2023-01-28 - # support: - # chrome: "45" - # chrome_android: "45" - # edge: "12" - # firefox: "69" - # firefox_android: "79" - # safari: "11" - # safari_ios: "11" - - api.Document.close - - api.Document.open - - api.Document.writeln - # baseline: high # baseline_low_date: 2020-10-20 # baseline_high_date: 2023-04-20 From 7aa62ff118caef360dfafc1ee88d5b590a1ad7f3 Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Wed, 12 Feb 2025 15:23:38 +0100 Subject: [PATCH 2/6] typoe --- features/document-write.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/document-write.yml b/features/document-write.yml index 177fd7a7705..6b5ae80f913 100644 --- a/features/document-write.yml +++ b/features/document-write.yml @@ -2,7 +2,7 @@ name: document.write() description: The `document.open()`, `document.write()`, `document.writeln()`, and `document.close()` methods write content to a document, possibly while that document is still loading. spec: https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html discouraged: - # The spec doesn't actually discourages against open and close, but these methods are + # The spec doesn't actually discourage against open and close, but these methods are # really only useful for writing anyway, so we're marking the whole feature as discouraged. according_to: - https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#document.write() From 9bc7affae4a83c1e646987bcfe17ff442785bd87 Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Fri, 21 Feb 2025 13:50:29 +0100 Subject: [PATCH 3/6] Update features/document-write.yml Co-authored-by: Daniel D. Beck --- features/document-write.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/features/document-write.yml b/features/document-write.yml index 6b5ae80f913..9c1b2dbf0f2 100644 --- a/features/document-write.yml +++ b/features/document-write.yml @@ -10,6 +10,8 @@ discouraged: - dom compat_features: - api.Document.write + - api.Document.write.accepts_TrustedHTML - api.Document.writeln + - api.Document.writeln.accepts_TrustedHTML - api.Document.open - api.Document.close From 1ed87eddb64388b6aa361099ff2f8b1b45396cb2 Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Fri, 21 Feb 2025 13:55:03 +0100 Subject: [PATCH 4/6] Re-gen dist --- features/document-write.yml.dist | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/features/document-write.yml.dist b/features/document-write.yml.dist index b8cc8b6aac8..8e4d700003d 100644 --- a/features/document-write.yml.dist +++ b/features/document-write.yml.dist @@ -4,13 +4,9 @@ status: baseline: false support: - chrome: "45" - chrome_android: "45" - edge: "12" - firefox: "69" - firefox_android: "79" - safari: "11" - safari_ios: "11" + chrome: "86" + chrome_android: "86" + edge: "86" compat_features: # baseline: high # baseline_low_date: 2020-07-28 @@ -27,7 +23,6 @@ compat_features: - api.Document.open - api.Document.writeln - # ⬇️ Same status as overall feature ⬇️ # baseline: false # support: # chrome: "45" @@ -38,3 +33,12 @@ compat_features: # safari: "11" # safari_ios: "11" - api.Document.write + + # ⬇️ Same status as overall feature ⬇️ + # baseline: false + # support: + # chrome: "86" + # chrome_android: "86" + # edge: "86" + - api.Document.write.accepts_TrustedHTML + - api.Document.writeln.accepts_TrustedHTML From 15a2753ecdedb4e165112370cf06ea25a10e16fe Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Fri, 21 Feb 2025 16:33:17 +0100 Subject: [PATCH 5/6] compute from document.write --- features/document-write.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/features/document-write.yml b/features/document-write.yml index 9c1b2dbf0f2..5a78b895d78 100644 --- a/features/document-write.yml +++ b/features/document-write.yml @@ -8,6 +8,8 @@ discouraged: - https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#document.write() alternatives: - dom +status: + compute_from: api.Document.write compat_features: - api.Document.write - api.Document.write.accepts_TrustedHTML From 18ccbb0d003c25fe501eb3732744e26358145346 Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Fri, 21 Feb 2025 18:50:00 +0100 Subject: [PATCH 6/6] Refresh dist --- features/document-write.yml.dist | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/features/document-write.yml.dist b/features/document-write.yml.dist index 8e4d700003d..e11f48b1d31 100644 --- a/features/document-write.yml.dist +++ b/features/document-write.yml.dist @@ -4,9 +4,13 @@ status: baseline: false support: - chrome: "86" - chrome_android: "86" - edge: "86" + chrome: "45" + chrome_android: "45" + edge: "12" + firefox: "69" + firefox_android: "79" + safari: "11" + safari_ios: "11" compat_features: # baseline: high # baseline_low_date: 2020-07-28 @@ -23,6 +27,7 @@ compat_features: - api.Document.open - api.Document.writeln + # ⬇️ Same status as overall feature ⬇️ # baseline: false # support: # chrome: "45" @@ -34,7 +39,6 @@ compat_features: # safari_ios: "11" - api.Document.write - # ⬇️ Same status as overall feature ⬇️ # baseline: false # support: # chrome: "86"