removeEventListener

Functionality

This function removes an event listener registered with addEventListener. It is part of the IAB Europe Transparency and Consent Framework (TCF) Specifications.

Syntax

function __tcfapi()

argument name

type

optional

value

description

argument name

type

optional

value

description

command

string

 

'removeEventListener'

 

version

integer

✔️

null|2

The TCF API version to use. Can be null instead.

callback

function

 

function(success:boolean)

The callback function that is called with the function call result.

parameter

integer

 

listenerId

The unique ID assigned by the CMP to the registered callback via addEventListener)

Description

An event listener registered with addEventListener returns tcData.listenerId as an unique listener id, that can be passed to removeEventListener to remove that listener again.

Scope

The function can be called at any time.

Examples

For usage, see examples from addEventListener.