late-namespace-request.html (738B)
1 <!DOCTYPE html> 2 <title>Late namespace request</title> 3 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script> 7 window.log = []; 8 9 const test_load = async_test( 10 "Test the situation where a module is instantiated without the " + 11 "need for a namespace object, but later on a different module " + 12 "requests the namespace."); 13 window.addEventListener("load", test_load.step_func_done(ev => { 14 assert_array_equals(log, 15 ["export-something", 16 "import-something-namespace", 42, 43]); 17 })); 18 </script> 19 <script type="module" src="export-something.js"></script> 20 <script type="module" src="import-something-namespace.js"></script>