Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/embedded-content/media-elements/track/track-element/track-load-from-element-readyState.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>Load event on HTMLTrackElement and LOADED readyState on TextTrack when src is set on the element</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<video>
<track src="resources/webvtt-file.vtt" default>
<script>
async_test(function(t) {
var track = document.querySelector("track");
track.onload = t.step_func_done(function() {
assert_equals(track.readyState, HTMLTrackElement.LOADED);
});
});
</script>
</video>