tor-browser

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

modal-dialog.html (620B)


      1 <!DOCTYPE html>
      2 <title>moveBefore should not close a modal dialog</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <body>
      6 <section id="old_parent">
      7    <dialog id="dialog">
      8    </dialog>
      9 </section>
     10 <section id="new_parent">
     11 </section>
     12 <script>
     13 promise_test(async t => {
     14    const dialog = document.querySelector("#dialog");
     15    dialog.showModal();
     16    document.querySelector("#new_parent").moveBefore(dialog, null);
     17    assert_equals(document.elementFromPoint(0, 0), dialog);
     18 }, "when reparenting a modal dialog, the dialog should stay modal");
     19 </script>