removeEventListener()

Removes an event listener from an element.

You cannot remove an event handler declared on a behavior using this method.

Syntax

behavior.removeEventListener(element, type, listener, useCapture);

Example

var mybehavior = jsb.behavior.extend({
  onmouseup: function(element) {
    this.removeEventListener(document.body, "mouseup", this.onbodymouseup, false);
  }
});

Notes

This method provides a cross-browser, safe way to perform the W3C equivalent method. Please note that Microsoft Internet Explorer does not support this method so you should always use the jsb method.

See Also