EN
Il contenuto non è disponibile nella lingua di destinazione, ma solo in inglese.

removeEventListener method

Removes an event handler that the addEventListener method registered.

Document Object Model (DOM) Level 3 Events Specification, Section 4.3

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:

true (true)

Remove the capturing phase event handler.

false (false)

Remove the bubbling phase event handler.

Return value

Type: HRESULT

This method can return one of these values.

Return codeDescription
S_OK

The operation completed successfully.

E_FAIL

The operation failed.

E_INVALIDARG

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

window
ApplicationCache
AudioTrackList
document
IDBDatabase
IDBRequest
IDBTransaction
MediaSource
MessagePort
MSInputMethodContext
MSMediaKeySession
Node
Screen
SourceBuffer
SourceBufferList
SVGElementInstance
TextNode
TextTrack
TextTrackCue
TextTrackList
WebSocket
Window
Window
WorkerGlobalScope
XMLHttpRequest
addEventListener

 

 

Mostra:
© 2014 Microsoft