From b2c5875bc1c3645261211616f8c82036748bc07d Mon Sep 17 00:00:00 2001 From: Mason Freed Date: Wed, 12 Aug 2020 09:22:45 -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 00000000000000..0f01cc41acf153 --- /dev/null +++ b/shadow-dom/declarative/element-internals-shadowroot.tentative.html @@ -0,0 +1,44 @@ + + +ElementInternals.shadowRoot + + + + + +