Skip to content

showAdvancedConsents

showAdvancedConsents is a DOM event that occurs whenever the advanced consents modal is displayed.

Event body

none

Example

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

useStorefront(async (storefront) => {
    document.addEventListener('showAdvancedConsents', () => {
        console.log('advanced consents modal has been displayed');
    });
});