summaryrefslogtreecommitdiffstats
path: root/dom/base/test/file_script_module_dynamic_and_element.js
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/test/file_script_module_dynamic_and_element.js')
-rw-r--r--dom/base/test/file_script_module_dynamic_and_element.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/dom/base/test/file_script_module_dynamic_and_element.js b/dom/base/test/file_script_module_dynamic_and_element.js
new file mode 100644
index 0000000000..4f5c707a4c
--- /dev/null
+++ b/dom/base/test/file_script_module_dynamic_and_element.js
@@ -0,0 +1,19 @@
+const { f } = await import(
+ "./file_script_module_dynamic_and_element_imported_1.js"
+);
+import { g } from "./file_script_module_dynamic_and_element_imported_2.js";
+import { h } from "./file_script_module_dynamic_and_element_imported_3.js";
+f();
+g();
+h();
+
+let script = document.createElement("script");
+script.id = "watchme2";
+script.setAttribute("type", "module");
+script.setAttribute(
+ "src",
+ "file_script_module_dynamic_and_element_imported_1.js"
+);
+document.body.appendChild(script);
+
+window.dispatchEvent(new Event("test_evaluated"));