From efb857d57457c386cc064763a67a7face7ec02e8 Mon Sep 17 00:00:00 2001 From: Mason Freed Date: Wed, 11 Nov 2020 11:34:56 -0800 Subject: [PATCH] Update declarative Shadow DOM opt-in mechanics The issue thread [1] has had more discussion, after the initial draft of declarative Shadow DOM opt-in landed [2]. This CL implements those bits of feedback. In particular: - There is no public allowDeclarativeShadowDom state available on Document or DocumentFragment. - All APIs use call parameters to avoid state, with the exception of DOMParser. - innerHTML no longer supports Declarative Shadow DOM. - A new setInnerHTML() function allows opt-in access to DSD. - Several of the more obscure APIs do not have an opt-in for declarative Shadow DOM, such as XHR, createContextualFragment, and document.write. - The sandbox flag has been removed from iframes completely. The new plan is to use DocumentPolicy to enable declarative Shadow DOM for iframes. For now, iframes always support declarative Shadow DOM. - 'allowDeclarativeShadowDOM' has become 'allowShadowRoot'. [1] https://github.com/whatwg/dom/issues/912#issuecomment-723188817 [2] https://chromium-review.googlesource.com/c/chromium/src/+/2513525 Bug: 1042130 Change-Id: I3a2becf2a113cc8647b29077d2efea1c990d4547 Cq-Do-Not-Cancel-Tryjobs: true --- ...ative-shadow-dom-attachment.tentative.html | 4 +- ...eclarative-shadow-dom-basic.tentative.html | 32 ++-- ...clarative-shadow-dom-opt-in.tentative.html | 144 +++++++----------- .../declarative/getinnerhtml.tentative.html | 2 +- .../declarative/setinnerhtml.tentative.html | 39 +++++ 5 files changed, 113 insertions(+), 108 deletions(-) create mode 100644 shadow-dom/declarative/setinnerhtml.tentative.html diff --git a/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html b/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html index 73b43829f1a0931..99a255bfa2187dd 100644 --- a/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html +++ b/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html @@ -7,8 +7,6 @@