Skip to content

submit

submit is a DOM event that occurs whenever the user subscribes to availability notifications via the subscribe modal.

Event body

none

Example

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

useStorefront(async (storefront) => {
    document.addEventListener('submit', () => {
        console.log('User has subscribed to notifications via modal');
    });
});