summaryrefslogtreecommitdiffstats
path: root/toolkit/components/extensions/test/xpcshell/data/file_document_open.html
blob: dae5e90667d9253269f5125afed0ae19cb547ea5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
</head>
<body>

  <iframe id="iframe"></iframe>

  <script type="text/javascript">
    "use strict";
    addEventListener("load", () => {
      let iframe = document.getElementById("iframe");
      let doc = iframe.contentDocument;
      doc.open("text/html");
      doc.write("Hello.");
      doc.close();
    }, {once: true});
  </script>
</body>
</html>