Number of registered listeners (test-only convenience).
Add a listener. Idempotent — same callback registered twice is held once.
Notify every listener of event. A listener that throws is
logged at error level and the iteration continues — one bad
listener never starves the rest.
Drop every listener — used on dispose.
Owns the listener Set for a
LoaderMonitorimplementation and emits events to all listeners with per-listener error isolation. A throw from one listener is logged and swallowed so the next listener in iteration order still runs.The emitter is decoupled from any specific loader: the loader's
addEventListener/removeEventListener/emitEventcalls delegate here, andclear()is called on dispose.