Skip to content

shippingAddressModal.opened

shippingAddressModal.opened is an event on the Event Bus that occurs whenever a modal containing a shipping address in the basket is opened.

Event body

The shippingAddressModal.opened body has a TShippingAddressModalOpenedBody type which represents the details of a modal that is currently being opened. It is optional so it might not exist.

Example

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

useStorefront(async (storefront) => {
    storefront.eventBus.on('shippingAddressModal.opened', ({ body }) => {
        console.log('Some shipping-address-modal webcomponent has been opened:', body);
    });
});