Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!doctype html>
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<script>
"use strict";
addEventListener("DOMContentLoaded", async () => {
const main1 = document.createElement("main");
const main2 = document.createElement("main");
const video = document.createElement("video");
const track = document.createElement("track");
video.appendChild(track);
video.appendChild(main2);
main1.appendChild(video);
document.documentElement.appendChild(main1);
const selection = getSelection();
selection.selectAllChildren(main1);
for (let count = 0; count < 10; count++) {
await new Promise(requestAnimationFrame);
selection.collapseToStart();
selection.modify("extend", "forward", "line");
}
document.documentElement.removeAttribute("class");
});
</script>
</head>
</html>