summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/document-write/module.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/document-write/module.html')
-rw-r--r--testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/document-write/module.html22
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/document-write/module.html b/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/document-write/module.html
new file mode 100644
index 0000000000..7e970d3fd9
--- /dev/null
+++ b/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/document-write/module.html
@@ -0,0 +1,22 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>document.write in a module</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id="log"></div>
+<script>
+async_test(t => {
+ const iframe = document.createElement("iframe");
+
+ iframe.onerror = t.unreached_func("Error loading iframe");
+ document.addEventListener("documentWriteDone", t.step_func(() => {
+ assert_equals(iframe.contentDocument.body.textContent, "Initial body contents\n");
+ }));
+ iframe.onload = t.step_func_done(() => {
+ assert_equals(iframe.contentDocument.body.textContent, "Initial body contents\n");
+ });
+
+ iframe.src = "module-iframe.html";
+ document.body.appendChild(iframe);
+});
+</script>