v132 · dom
Popover invoker and anchor positioning improvements
This chromestatus represents the following related set of changes, which were resolved in https://github.com/whatwg/html/pull/9144#issuecomment-2195095228 and landed in https://github.com/whatwg/html/pull/10728:
concepts
-
Popover invoker anchor
Popover invokers automatically become CSS anchors for their popover.
-
menu per row
Many invokers, no per-row anchor-name — the same popover template reused on every list row.
-
invoker types
Side-by-side
popovertarget,commandfor+command, programmaticshowPopover(), andcommandon a dialog. Snippets included. -
anchor chain (cascade menu)
Submenu popover anchored to a menu item inside its parent popover. Compare declarative invokers,
showPopover({ source }), and the missing-source failure case.
why it shipped
The popovertarget attribute creates an "invoker" relationship between the invoking button and the popover. That does several things: