removeEventListener

The removeEventListener JS EventTarget removes the event listener in target’s event listener list with the same type, callback, and options.

Syntax

target.removeEventListener(type, callback [, options])

Parameters

type

The type of event.

callback

The callback that will be invoked when the event is dispatched.

options

Allows setting the capture, once, passive, and signal attributes.

Examples

1 · type callback · event

2 · type callback · mouseevent

3 · options · false

4 · options · true

5 · options · capture · false

6 · options · capture · true

7 · options · once · false

8 · options · once · true

9 · options · passive · false

10 · options · passive · true

11 · options · signal

HomeMenu