Skip to content

enableMask

enableMask is a DOM event that occurs whenever the country gets selected and validation mask should be enabled inside certain elements like a postal code input.

Event body

none

Example

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

useStorefront(async (storefront) => {
    storefront.eventBus.on('enableMask', () => {
        console.log('Enable mask on specific parts of the form');
    });
});