Skip to content

opened

opened is a DOM event that occurs whenever the sheet has been opened.

Event body

none

Example

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

useStorefront(async (storefront) => {
    document.addEventListener('opened', () => {
        console.log('A sheet has been opened');
    });
});