Baseline Widely available
The srclang
property of the HTMLTrackElement
interface reflects the value of the <track>
element's srclang
attribute or the empty string if not defined.
The srclang
attribute is a BCP 47 language tag indicating the language of the text track's data.
A string.
Exampleconst trackElement = document.getElementById("exampleTrack");
console.log(`Track's language: ${trackElement.srclang}`);
trackElement.srclang = "en-US";
Specifications Browser compatibility See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4