Skip to content

open

open is a DOM event that occurs whenever the menu is being opened.

Event body

none

Example

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

useStorefront(async (storefront) => {
    document.addEventListener('open', () => {
        console.log('Menu is being opened');
    });
});