variable / @typed/template

RootEvents.rootEvents

Installs scoped native bubbling listeners on a root. Undefined options inherit CurrentRootEvents, records override inherited event names individually, and false disables the inherited policy entirely.

Only stopPropagation is called. Target handlers, other listeners on this same root, and browser default actions remain available. Ancestor capture handlers have already run; events that do not bubble to the root are not intercepted. This is an event bubbling policy, not a security or complete event-isolation boundary. Each listener is removed when the calling Scope closes.

Package version
1.0.0-beta.13
Category
Root event propagation
Since
1.0.0
Member of
RootEvents

Import

import { RootEvents } from "@typed/template";

Access RootEvents.rootEvents through the imported RootEvents export. Its declaration below describes the member.

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

Signatures

export declare const rootEvents: (root: EventTarget, options?: RootEventOptions | undefined) => Effect.Effect<void, never, Scope.Scope>;

Other public imports

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

Source