Skip to main content

context

Description

a context object related to the clicked menu item

Type

object

Example

<script>
function clicked(ev){
const { context, action } = ev;
if (action)
active[context] = action.id;
}
</script>

<Menu {options} onclick={clicked}/>

Details

When a user clicks on an item, Menu triggers the "click" event, where event.detail contains an object related to the clicked menu item.