function / @typed/template

EventHandler.stopImmediatePropagation

Modifies an EventHandler to call stopImmediatePropagation() on the event.

Package version
1.0.0-beta.7
Category
Propagation control
Since
1.0.0
Member of
EventHandler

Import

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

Access EventHandler.stopImmediatePropagation through the imported EventHandler 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 function stopImmediatePropagation<Ev extends Event, E = never, R = never>(handler: EventHandler<Ev, E, R>): EventHandler<Ev, E, R>;

Why

This exposes the browser’s immediate-propagation control directly.

Ownership and lifetime

The returned description is inert; the renderer Scope owns its listener.

Examples

import * as EventHandler from "@typed/template/EventHandler"

const handler = EventHandler.make((event) => {
  console.log("Immediate propagation stopped")
})

const stopImmediateHandler = EventHandler.stopImmediatePropagation(handler)

Other public imports

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

Source