Skip to content

hidden

hidden is a DOM event that occurs after the dropdown got fully hidden.

Event body

none

Example

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

useStorefront(async (storefront) => {
    document.addEventListener('hidden', () => {
        console.log('dropdown has been hidden');
    });
});