From 61c3f202d15192824e2225055ab3799c0fc908fd Mon Sep 17 00:00:00 2001 From: Mason Freed Date: Tue, 11 Aug 2020 16:05:13 -0700 Subject: [PATCH] Add ElementInternals.shadowRoot which returns both open and closed roots See [1] for context. This CL adds the shadowRoot attribute to ElementInternals, which allows custom elements to access their own shadow roots, including in the case that the shadowRoot is closed. Without this capability, custom elements that use closed declarative shadow roots would have no ability to retrieve the contents of their own shadow root. Bug: 1042130 [1] https://github.com/w3c/webcomponents/issues/871#issuecomment-672082936 Change-Id: I33606144bec3c27600d2e67f108d0344f7696dd2 --- ...lement-internals-shadowroot.tentative.html | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 shadow-dom/declarative/element-internals-shadowroot.tentative.html diff --git a/shadow-dom/declarative/element-internals-shadowroot.tentative.html b/shadow-dom/declarative/element-internals-shadowroot.tentative.html new file mode 100644 index 000000000000000..0f01cc41acf1535 --- /dev/null +++ b/shadow-dom/declarative/element-internals-shadowroot.tentative.html @@ -0,0 +1,44 @@ + + +ElementInternals.shadowRoot + + + + + +