This PR adds a method to get a shallow copy of the internal listeners Set. Changes to this Set will not modify the internal set, but if fine-grained assertions are required, or if you've done something crazy like wrapping the Chrome API Event objects, this feature will provide some relief.
Also, there was a runtime type check during calls to Event#callListeners, which was not tested and was sometimes wrong. This has been removed.
This PR adds a method to get a shallow copy of the internal listeners Set. Changes to this Set will not modify the internal set, but if fine-grained assertions are required, or if you've done something crazy like wrapping the Chrome API Event objects, this feature will provide some relief.
Also, there was a runtime type check during calls to
Event#callListeners
, which was not tested and was sometimes wrong. This has been removed.