krakenjs / post-robot

Cross domain post-messaging on the client side using a simple listener/client pattern.
Apache License 2.0
741 stars 92 forks source link

Add cancelAll function #90

Open TheTripleV opened 3 years ago

TheTripleV commented 3 years ago

Partially Resolves #41 .

This PR exports the cancelResponseListeners function under the postRobot object as postRobot.cancelAll().

hacktoberfest !

mstuart commented 3 years ago

Thanks @TheTripleV !

bluepnume commented 3 years ago

Hi -- ideally we should cancel request listeners, not response listeners. Response listeners are only for in-flight messages.