djipco / webmidi

Tame the Web MIDI API. Send and receive MIDI messages with ease. Control instruments with user-friendly functions (playNote, sendPitchBend, etc.). React to MIDI input with simple event listeners (noteon, pitchbend, controlchange, etc.).
Apache License 2.0
1.54k stars 115 forks source link

Method to remove all listener #3

Closed teristam closed 8 years ago

teristam commented 8 years ago

Currently is there any method to remove all registered listener from an event type? Now the function reference must be provided before one can remove the listener. It will be helpful if one can clear all the listeners of a particular event type without providing the references, e.g. in angular.js, this can allow one to assign different listener to WebMidi based on the current view.

Thank you!

djipco commented 8 years ago

This feature has been to version 2.0.0-alpha.1.