tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

inactive-context-import.html (549B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>Dynamic import triggered from inactive context should not crash</title>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 
      7 <div id="container">
      8 <iframe></iframe>
      9 </div>
     10 
     11 <script>
     12 test(() => {
     13  const iframe = document.querySelector('iframe');
     14  const otherWindow = iframe.contentWindow;
     15  iframe.remove();
     16 
     17  // Below should not crash
     18  otherWindow.eval(`import('foobar');`);
     19 }, 'dynamic import from inactive context should not crash');
     20 </script>