Bug 1931913 - [wpt-sync] Update web-platform-tests to fb6c27f65c829cea708e497db128f58...
[gecko.git] / layout / reftests / selection / invalidation-2f.html
blobf74821f90fd82976a5fbaf6c84bc56794cd5ca35
1 <!DOCTYPE html>
2 <html class="reftest-wait">
3 <head>
4 <body>
5 <p id="first">f<span>o</span>o</p>
6 <p id="second">bar</p>
7 <script>
8 document.body.offsetTop;
9 var p1 = document.getElementById("first");
10 var p2 = document.getElementById("second");
11 var selection = window.getSelection();
12 selection.setBaseAndExtent(p1.lastChild, 1, p2.firstChild, 2);
14 function doTest() {
15 selection.collapse(p2.firstChild, 3);
16 document.documentElement.removeAttribute('class');
18 document.addEventListener("MozReftestInvalidate", doTest);
19 </script>
20 </body>
21 </html>