e5c5dcd9e2
Summary: Rewrites `EventEmitter` as a simple, type-safe abstraction with a minimal interface. The public interface of `EventEmitter` is unchanged. This rewrite was made possible only after deprecating and removing public methods that imposed restrictions on implementation details (e.g. deleting `removeListener`). However, this includes a subtle breaking change that makes it behave the same as `EventEmitter` in Node.js and `EventTarget` in the DOM. The set of listeners being notified by `emit` will no longer be influenced by changes made during the course of notifying the existing listeners. Changelog: [General][Changed] - `EventEmitter#emit` now freezes the set of listeners before iterating over them, meaning listeners that are added or removed will not affect that iteration. Reviewed By: javache Differential Revision: D22153962 fbshipit-source-id: 81b87113590dee0296eff61374bf732171855453 |
||
---|---|---|
.. | ||
core | ||
emitter |