Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hide the .content() property for declarative shadow roots
With this CL, the .content() property of a declarative shadow root (a <template shadowroot="open|closed"> element being parsed) will return null. Note that this <template> element only exists during parsing, and upon the closing </template> tag being encountered by the parser, the shadowroot will be created, the <template> contents will be moved into the shadowroot, and the <template> itself will be deleted. So this change is only visible from MutationObservers and other script that runs *during* parsing. This CL prevents that script from accessing the contents of the (potentially closed) shadow root. See point #1 at [1] for more context. [1] whatwg/dom#831 (comment) Bug: 1042130 Change-Id: Id096d1b65dc94b7a75afdc6143341eb4521da41a Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2133308 Commit-Queue: Mason Freed <masonfreed@chromium.org> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Auto-Submit: Mason Freed <masonfreed@chromium.org> Cr-Commit-Position: refs/heads/master@{#759495}
- Loading branch information