Skip to content

click

click is a DOM event that occurs whenever the h-tag webcomponent gets clicked.

Event body

none

Example

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

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