[wpt-sync] Sync PR 22874 - Hide the .content() property for declarative shadow roots
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 22874 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/22874
Details from upstream follow.
Mason Freed <masonfreed@chromium.org> wrote:
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] https://github.com/whatwg/dom/issues/831#issuecomment-608129380
Bug: 1042130
Change-Id: Id096d1b65dc94b7a75afdc6143341eb4521da41a
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://chromium-review.googlesource.com/2133308
WPT-Export-Revision: d2ee0676503dd4118b9ce2666274a9c95c43542b
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 3•5 years ago
|
||
Comment 4•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7a8bc5291980
https://hg.mozilla.org/mozilla-central/rev/5333249adfda
Description
•