summaryrefslogtreecommitdiffstats
path: root/dom/base/test/fullscreen/file_fullscreen-bug-1798219-2.html
blob: 48f2dea09db582d9140d82e6b11623d4bac418b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE HTML>
<button>Launch</button>
<script>
let button = document.querySelector("button");
button.addEventListener("click", function() {
  let newWindow = window.open("", "", "newWindow");
  newWindow.document.write(`<!DOCTYPE HTML>
    <button>click me!</button>
    <script>
      let button = document.querySelector("button");
      button.addEventListener("click", function(e) {
        document.documentElement.requestFullscreen();
        setTimeout(() => {
          while(true) {
            // slowdown event loop
          };
        }, 1);
        location.href = "https://example.org/browser/dom/base/test/fullscreen/dummy_page.html";
      });
    <\/script>`);
});
</script>