Module / v1.0.0-beta.7

@typed/template/EventSource

2 unique exports available through this public import path, including their members and aliases.

import * as EventSource from "@typed/template/EventSource";

Delegated event sources

  • EventSource

    interface

    An interface for managing event listeners on DOM nodes.

    It abstracts the process of adding and removing event listeners, ensuring that they are properly cleaned up when the scope is closed or the element is removed.

  • makeEventSource

    function

    Creates a new EventSource.

    The created EventSource can efficiently manage multiple event listeners, grouping them by event type and handling setup/teardown lifecycles.