@tempots/dom

emitStopPropagation() function

Creates a new event handler that stops event propagation and invokes the provided function.

Signature:

emitStopPropagation: (fn: () => void) => (event: Event) => void

Parameters

Parameter

Type

Description

fn

() => void

The function to be invoked when the event is triggered.

Returns: (event: Event) => void

A new event handler function.