class HandlerRegistry
implements AutonomousCustomElement
A Scoped Handler Registry implements the logic for handling effect requests.
Extend this class by adding new methods in your subclass to implement your own effect handlers
References the handler's AbortController
.
The abort
method of the controller is called in the disconnectedCallback
method. It allows to cleanup event handlers and other abortable operations
connectedCallback(): void
disconnectedCallback(): void
effect(callback: EffectCallback): void
Creates an effect that is automatically cleaned up when the component is disconnected
An optional AbortSignal can be provided to abort the effect prematurely
hydrateElement(element: Element): void