From d67e0c49067f3fd3cb19a02e88479eb00ff2f7ec Mon Sep 17 00:00:00 2001 From: Mason Freed Date: Wed, 14 Feb 2024 15:13:37 -0800 Subject: [PATCH] Only check for matching mode in attachShadow Per the new-new consensus, attachShadow will only verify that the existing declarative shadow root's `mode` matches the newly requested `mode`: https://github.com/whatwg/html/issues/10107#issuecomment-1937077298 Bug: 41483062 Change-Id: Ie3bac4ec297c0b85c40b45495e9c823dd47cb49e --- ...arative-shadow-dom-repeats.tentative.html} | 52 +++++++++++-------- 1 file changed, 31 insertions(+), 21 deletions(-) rename shadow-dom/declarative/{declarative-shadow-dom-repeats.html => declarative-shadow-dom-repeats.tentative.html} (55%) diff --git a/shadow-dom/declarative/declarative-shadow-dom-repeats.html b/shadow-dom/declarative/declarative-shadow-dom-repeats.tentative.html similarity index 55% rename from shadow-dom/declarative/declarative-shadow-dom-repeats.html rename to shadow-dom/declarative/declarative-shadow-dom-repeats.tentative.html index 69f5c0f077afbc6..5a6ca341470059e 100644 --- a/shadow-dom/declarative/declarative-shadow-dom-repeats.html +++ b/shadow-dom/declarative/declarative-shadow-dom-repeats.tentative.html @@ -46,33 +46,43 @@ assert_equals(shadow,initialShadow,'Same shadow should be returned'); assert_equals(shadow.textContent,'','Shadow should be empty'); },'Calling attachShadow() on declarative shadow root must match type'); - -
- -
+function getDeclarativeHost(t) { + const wrapper = document.createElement('div'); + wrapper.setHTMLUnsafe(`
+ +
`); + t.add_cleanup(() => wrapper.remove()); + document.body.appendChild(wrapper); + return wrapper.querySelector('div'); +} -