tor-browser

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

dialog-setup-cleanup-crash.html (666B)


      1 <!doctype html>
      2 <link rel="author" href="mailto:wpt@keithcirkel.co.uk" />
      3 <link rel="help" href="https://html.spec.whatwg.org/#the-dialog-element" />
      4 
      5 <!-- This test passes if it does not crash. -->
      6 
      7 <iframe src="./resources/showmodal-frame.html"></iframe>
      8 
      9 <script>
     10  new Promise((resolve) => (window.loaded = resolve)).then(() => {
     11    const iframe = document.body.querySelector("iframe");
     12    const iframeDoc = iframe.contentDocument;
     13    iframe.remove();
     14    iframeDoc.querySelector("dialog").close();
     15    iframeDoc.querySelector("dialog").setAttribute("open", "");
     16    document.body.append(iframe);
     17    iframeDoc.querySelector("dialog").show();
     18  });
     19 </script>