Comment on page
What is listener
Library loader and event framework 🔨✨
Listener provides a single entry point to load libraries. Users pass class instances to the
listener.load
function, which returns a promise.Listener executes library load callbacks. When loading a library, listener discovers and executes callback functions. Callbacks may be asynchronous.
Listener detects library functions with
lid
as the first argument, signifying them as listener functions. The lid
(listener id) argument is a human-readable call stack identifier.Listener can bind listener function calls to each other. The
listener.bind
function uses identifiers to attach listener function calls to each other, and seamlessly handles synchronicity.Listener libraries usually do not need dependencies, instead they join with libraries that the end user makes available at runtime through
listener.load
.Listener is perfect for modern dynamic loading using
<script type=module>
and import()
without needing to lean too much on packaging tools for code splitting.Library | Description |
Execute listeners from the command line | |
Lightweight JSX web components | |
Universal http requests | |
Join libraries together at runtime | |
Listener logging with log levels and filtering | |
Immutable identifier-based storage |
Last modified 4yr ago