Skip to content

saveConsents

saveConsents is a DOM event that occurs whenever the consents are saved.

Event body

none

Example

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

useStorefront(async (storefront) => {
    document.addEventListener('saveConsents', () => {
        console.log('Consents have been saved');
    });
});