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.loadfunction, 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
lidas 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.bindfunction 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 is perfect for modern dynamic loading using
import()without needing to lean too much on packaging tools for code splitting.