Inside object constructor:
this.notification.addEventListener(barcodeScanner.NEW_READING, this.handleBarcode.bind(this));
And when it destroys:
this.notification.removeEventListener(barcodeScanner.NEW_READING, this.handleBarcode.bind(this), this);
I can add event listener and works properly but I cannot remove single event listener when object destroys.
Although it is not quite related to the problem, I am using EventDispatcher.js and Class.js.
I can modify code in EventDispatcher.js to fit what I need. But how can I remove event listener of a object's function without removing all other listener?