Skip to content

closed

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