This page is Almost Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

removeEventListener

Summary

Removes an event handler that the addEventListener method registered.

Method of dom/EventTargetdom/EventTarget

Syntax

 target.removeEventListener(type, listener, useCapture);

Parameters

type

Data-type
String

The event type that the event handler is registered for.

listener

Data-type
function

The event handler function to remove.

useCapture

Data-type
Boolean

A Boolean value that specifies the event phase to remove the event handler from.

Return Value

No return value

Notes

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.

Related specifications

DOM Level 3 Events
Working Draft

Attributions