late-star-export-request.html (873B)
1 <!DOCTYPE html> 2 <title>Late star-export 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 a use of " + 11 "its star-exports, but later on a different module requests them."); 12 window.addEventListener("load", test_load.step_func_done(ev => { 13 assert_array_equals(log, [ 14 "export-something", "export-something-nested", 15 "import-something-namespace", 42, 43]); 16 })); 17 </script> 18 <script type="module" src="export-something-nested.js"></script> 19 <script type="module"> 20 log.push("import-something-namespace"); 21 log.push(foo); 22 set_foo(43); 23 log.push(foo); 24 import {foo, set_foo} from "./export-something-nested.js"; 25 </script>