summaryrefslogtreecommitdiffstats
path: root/dom/base/test/fullscreen/file_fullscreen-bug-1798219-2.html
blob: 61db80c228677e6190301bc2964e6a341733a8bc (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(e) {
  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>