Skip to content

menuContentShowed

menuContentShowed is a DOM event that occurs whenever the menu content has been displayed.

Event body

The menuContentShowed body has a TMenuContentShowedEventDetail type which represents the details of the showed menu content element. It is optional so it might not exist.

Example

In this example we listen to menuContentShowed event and perform an action whenever it's emitted.

useStorefront(async (storefront) => {
    document.addEventListener('menuContentShowed', (event) => {
        const $menuContent = event.detail?.$el;

        console.log('Menu content has been displayed', $menuContent);
    });
});