Import
import { EventHandler } from "@typed/template";This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.
Signatures
export * as EventHandler from "./EventHandler.js";Members
EventHandler.ErrorExtracts the typed error channel of an
EventHandler.EventHandler.EventHandlerRepresents a DOM event handler that returns an Effect.
It encapsulates the event handler logic and any options (like
preventDefault,once, etc.) that should be applied when the event is triggered.EventHandler.EventHandlerTypeIdThe global symbol used to identify
EventHandlervalues across module copies.EventHandler.EventOfExtracts the native event type accepted by an
EventHandler.EventHandler.EventOptionsOptions for applying native event behavior before an Effect handler runs.
EventHandler.ServicesExtracts the Effect service requirements of an
EventHandler.EventHandler.catchCauseRecovers from errors in the
EventHandler.EventHandler.fromEffectOrEventHandlerHelper to ensure a value is an
EventHandler.If the input is already an
EventHandler, it is returned as is. If it is anEffect, it is wrapped in anEventHandlerthat ignores the event argument.EventHandler.handleEventOptionsApplies event options to a native DOM event.
EventHandler.isEventHandlerChecks if a value is an
EventHandler.EventHandler.makeCreates a new
EventHandler.EventHandler.onceModifies an
EventHandlerto run only once.EventHandler.passiveModifies an
EventHandlerto be passive (improves scrolling performance).EventHandler.preventDefaultModifies an
EventHandlerto callpreventDefault()on the event.EventHandler.provideProvides services to the
EventHandler.This allows you to inject dependencies into the effect returned by the event handler.
EventHandler.stopImmediatePropagationModifies an
EventHandlerto callstopImmediatePropagation()on the event.EventHandler.stopPropagationModifies an
EventHandlerto callstopPropagation()on the event.