Skip to content
Commit 58bfaa79 authored by Dan Clark's avatar Dan Clark Committed by Chromium LUCI CQ
Browse files

[selectmenu] Add console warnings for missing button/listbox parts

Per the resolution of https://github.com/openui/open-ui/issues/291,
emit a console warning when a <selectmenu>'s default listbox or button
is removed without a replacement being provided.

In order to emit these warnings consistently, add a slotchange handler
to catch the case where the named slots are replaced at parse time
without a replacement part being provided. No mutation observer was
firing for this case, so the default parts were not being properly
swapped out.

Also, add a test that was missing for selected-value part in
selectmenu-parts-structure.tentative.html.

Bug: 1234899
Change-Id: If639d7eccf1db59518ef862e3beaaa8a2a09e6cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3072218


Reviewed-by: default avatarIonel Popescu <iopopesc@microsoft.com>
Reviewed-by: default avatarMason Freed <masonf@chromium.org>
Commit-Queue: Dan Clark <daniec@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#908669}
parent 53260585
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment