tor-browser

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

spellcheck-enumerated-ascii-case-insensitive.html (1237B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <link rel="help" href="https://html.spec.whatwg.org/#attr-spellcheck">
      4 <link rel="help" href="https://html.spec.whatwg.org/#enumerated-attribute">
      5 <meta name="assert" content="@spellcheck values are ASCII case-insensitive">
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <!--
      9  While <div> and <span> aren’t defined as “checkable for the purposes of this
     10  feature”, this has no effect on the attribute’s state.
     11 
     12  We wrap the <span> elements under test with <div> elements so the checking
     13  enabled algorithm stops at step 4 (ancestor content attribute), before steps
     14  relying on user-agent-defined behavior (see [#concept-spellcheck-default]).
     15 -->
     16 <div spellcheck="true"><span spellcheck="false"></span></div>
     17 <div spellcheck="true"><span spellcheck="FaLsE"></span></div>
     18 <div spellcheck="true"><span spellcheck="falſe"></span></div>
     19 <script>
     20 const span = document.querySelectorAll("span");
     21 
     22 test(() => {
     23  assert_equals(span[0].spellcheck, false, "lowercase valid");
     24  assert_equals(span[1].spellcheck, false, "mixed case valid");
     25  assert_equals(span[2].spellcheck, true, "non-ASCII invalid");
     26 }, "keyword false");
     27 </script>