Removes an event handler that the addEventListener method registered.
HRESULT removeEventListener( BSTR type, IDispatch *listener, VARIANT_BOOL useCapture );
- [in] The event type that the event handler is registered for.
- [in] The event handler function to remove.
- [in] A VARIANT_BOOL value that specifies the event phase to remove the event handler from:
- Remove the capturing phase event handler.
- Remove the bubbling phase event handler.
Returns one of the following values.
S_OK The operation completed successfully. E_FAIL The operation failed. E_INVALIDARG One or more arguments are invalid.
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.