Bug 1730299 [wpt PR 30567] - Don't let attachShadow() succeed subsequent times for...
commit013008c2837f9c2960ff8fb68fcdb93cd693cb9c
authorDan Clark <daniec@microsoft.com>
Sun, 3 Oct 2021 10:13:18 +0000 (3 10:13 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Mon, 4 Oct 2021 00:19:03 +0000 (4 00:19 +0000)
treeeb190abfec5e9b1e7092db711055a464b7352094
parent8cf2c22ebaf748d0a70fd6fbd357632468c2d5b1
Bug 1730299 [wpt PR 30567] - Don't let attachShadow() succeed subsequent times for declarative shadow roots, a=testonly

Automatic update from web-platform-tests
Don't let attachShadow() succeed subsequent times for declarative shadow roots

Currently, attachShadow() can be called any number of times for a
shadow host with a declarative shadow root, and each time the shadow
will be emptied out and returned.

The correct behavior is to only do this the first time attachShadow()
is called, and then throw errors an subsequent attempts. Implement
this behavior by clearing the declarative shadow root flag for
roots returned from Element::attachShadow.

Change-Id: I5d3d31fc8eaa09e5866191135743fe3f610accaa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3154852
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Dan Clark <daniec@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#920845}

--

wpt-commits: 66222c6331b4e41c845e8f4ea6b14c83294c3632
wpt-pr: 30567
testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html