Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Track Object

HTML DOM Track Object


The Track object

The Track object is new in HTML5.

The Track object represents HTML .

Access the Track Object

You can access it by using getElementById() element:

var x = document.getElementById("myTrack");

Create the Track Object

You can use the document.createElement() method to create an element. element:

var x = document.createElement("TRACK");

Track Object Properties

property Description
default Sets or returns the default state of the track
kind Sets or returns the value of the kind attribute of the track
label Sets or returns the value of the label attribute of the track
readyState Returns the state of the current track resource
src Sets or returns the value of the src attribute of the track
srclang Sets or returns the value of the srclang attribute of the track
track Returns the TextTrack object, representing the text track data of the track element

Standard properties and events

The Track object also supports standard property and Events.


Related Articles

HTML Reference Manual: HTML tag