Skip to content

confirm

confirm is a DOM event that occurs whenever the confirm modal action is confirmed.

Event body

none

Example

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

useStorefront(async (storefront) => {
    document.addEventListener('confirm', () => {
        console.log('Action in confirm modal has been confirmed');
    });
});