GO-V.ORG
As seen in

TextTrackCue: exit event

WebVTT

WebVTT

The **`exit`** event fires when a cue stops being active.

## Syntax

Use the event name in addEventListener():

```js-nolint
addEventListener("exit", (event) => { })
```

Alternatively, assign to the [event handler property](/docs/Web/API/Document_Object_Model/Events#using_onevent_properties) of the interface:

```js-nolint
onexit = (event) => { }
```

## Event type

A generic Event with no added properties.

## Example

In the following example, `cue` prints to the console when it stops being displayed as the active cue.

```js
cue.addEventListener("enter", (event) => {
console.log("Cue 1 has left the building.");
});
```

## Specifications

## Browser compatibility

source: MDN Web Docs mirror · page

Cite this

"TextTrackCue: exit event". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/TextTrackCue/exit_event

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·