Skip to content

remove

remove is a DOM event that occurs whenever the h-tag webcomponent gets removed.

Event body

none

Example

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

useStorefront(async (storefront) => {
    document.addEventListener('remove', () => {
        console.log('Tag has been removed');
    });
});