Skip to content

closed

closed is a DOM event that occurs whenever the menu has been closed.

Event body

none

Example

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

useStorefront(async (storefront) => {
    document.addEventListener('closed', () => {
        console.log('Menu has been closed');
    });
});