tor-browser

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

inert-node-is-unselectable.html (611B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <meta charset="utf-8" />
      5    <title>inert nodes are unselectable</title>
      6    <link rel="author" title="Alice Boxhall" href="aboxhall@chromium.org">
      7    <script src="/resources/testharness.js"></script>
      8    <script src="/resources/testharnessreport.js"></script>
      9  </head>
     10 <body>
     11  <div inert>Here is a text node you can't select.</div>
     12  <div>I'm selectable.</div>
     13 <script>
     14 test(function() {
     15    document.execCommand('SelectAll');
     16    assert_equals(window.getSelection().toString().trim(), "I'm selectable.");
     17 }, "Inert nodes cannot be selected.");
     18 </script>
     19 </body>
     20 </html>