modulepreload-link-header.html (517B)
1 <!DOCTYPE html> 2 <html> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script> 6 const log = []; 7 </script> 8 <script type="importmap"> 9 { 10 "imports": { 11 "../resources/log.js?pipe=sub&name=A": "../resources/log.js?pipe=sub&name=B" 12 } 13 } 14 </script> 15 <script> 16 promise_test(() => { 17 return import("../resources/log.js?pipe=sub&name=A") 18 .then(() => assert_array_equals(log, ["log:B"])) 19 }, 20 'With modulepreload link header, import maps work fine'); 21 </script>