type-alias / @typed/ui/Dom/index

ElementEventHandlers

Native on* handlers supported by a concrete DOM element.

Learn this UI primitive →

Package version
1.0.0-beta.13
Category
Event input types
Since
1.0.0

Import

import type { ElementEventHandlers } from "@typed/ui/Dom/index";

This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.

Signatures

export type ElementEventHandlers<Element extends globalThis.Element> = {
    readonly [K in keyof Element as K extends `on${string}` ? K : never]?: EffectInput | EventHandler.EventHandler<EventOf<Element[K]>, any, any> | null;
};

Why

The browser’s own element interface supplies event names and event types, keeping custom hosts aligned with web standards.

Ownership and lifetime

Handlers run as Effects and are detached with the rendering Scope.

Other public imports

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

Source