Skip to content

closed

closed is a DOM event that occurs whenever the menu view 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 view has been closed');
    });
});