Events
import { emit, on, once } from '@rtorcato/js-common/events'
Exports
| Name | Summary |
|---|---|
emit | Dispatches a custom event on the target. |
on | Adds an event listener and returns a function to remove it. |
once | Waits for a single event to occur and resolves a promise. |
preventDefault | Prevents the default action for an event. |
stopPropagation | Stops propagation for an event. |