TextTrackCue.onexit

The onexit EventHandler of the TextTrackCue interface processes exit events.

The exit event fires when a cue stops being active.

Syntax

TextTrackCue.onexit = function;
TextTrackCue.addEventListener('exit', function);

Example

In the following example, onenter is used to print to the console when cue1 stops being displayed as the active cue.

cue1.onexit = function() {
  console.log('Cue 1 has left the building.');
}

Specifications

Specification
HTML Standard (HTML)
# handler-texttrackcue-onexit

Browser compatibility

BCD tables only load in the browser