function / @typed/template/EventHandler

handleEventOptions

Applies event options to a native DOM event.

Package version
1.0.0-beta.7
Category
Native event control
Since
1.0.0

Import

import { handleEventOptions } from "@typed/template/EventHandler";

Signatures

export declare function handleEventOptions<Ev extends Event>(eventOptions: EventOptions, ev: Ev): boolean;

Why

Centralizing these calls guarantees that options invoke the supplied event’s methods before its Effect handler runs. For rendered handlers those methods are bound through the EventSource Proxy to the underlying native event.

Ownership and lifetime

The function borrows the event for the call and retains nothing.

Examples

import { handleEventOptions } from "@typed/template/EventHandler"

handleEventOptions({ preventDefault: true }, new Event("submit", { cancelable: true }))

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source