When a menu option is selected, a non-bubbling version of this event is emitted on the DropdownMenuElement.
If that event isn't cancelled, (that is, if preventDefault() was not called) a bubbling version of this event is
emitted on the element which originally triggered the opening of the menu. If that event also isn't cancelled, then
the menu will be closed. Otherwise, if either event is cancelled, the menu will be prevented from closing.
The event type used in
element.addEventListener("dropdownSelect", ...)
This is a DOM event using the
CustomEvent
type with the event name"dropdownSelect"
. TheDropdownSelectEventDetails
will be on the.details
property of this object.When a menu option is selected, a non-bubbling version of this event is emitted on the DropdownMenuElement. If that event isn't cancelled, (that is, if
preventDefault()
was not called) a bubbling version of this event is emitted on the element which originally triggered the opening of the menu. If that event also isn't cancelled, then the menu will be closed. Otherwise, if either event is cancelled, the menu will be prevented from closing.