summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/webappapis/user-prompts/print-in-detached-frame.html
blob: 474f4f4d2a2e4956a686e42618279a9322695d59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>
<meta charset="utf-8">
<title>print() in a detached iframe</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<body>
<script>
"use strict";

test(() => {
  const iframe = document.createElement("iframe");
  document.body.append(iframe);
  const print = iframe.contentWindow.print;
  iframe.remove();

  print();
});
</script>