Removes an event handler that the addEventListener method registered.
![]() |
Syntax
object.removeEventListener(type, listener, useCapture)Parameters
- type [in]
-
Type: String
The event type that the event handler is registered for.
- listener [in]
-
Type: Object
The event handler function to remove.
- useCapture [in]
-
Type: Boolean
A Boolean value that specifies the event phase to remove the event handler from:
Return value
Type: HRESULT
This method can return one of these values.
| Return code | Description |
|---|---|
|
The operation completed successfully. |
|
The operation failed. |
|
One or more arguments are invalid. |
Standards information
Remarks
If you register multiple identical event handlers for the same event type, the duplicate event handlers are discarded. You can remove only the first instance.
If the arguments for removeEventListener do not identify a registered event handler, the call to removeEventListener has no effect.
See also
Build date: 11/29/2012
