tor-browser

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

option-with-br.html (974B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>option element with br child</title>
      4 <link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me">
      5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#concept-option-label">
      6 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-option-text">
      7 <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-select-element-2">
      8 
      9 <link rel="match" href="option-with-br-ref.html">
     10 
     11 <p>This test passes if the option element displays three options:</p>
     12 
     13 <pre>a
     14 b
     15 ab</pre>
     16 
     17 <p>Importantly the third option must not be split across two lines.</p>
     18 
     19 <select multiple>
     20  <option>a</option>
     21  <option>b</option>
     22  <option id="manipulate-me"></option>
     23 </select>
     24 
     25 <script>
     26 "use strict";
     27 const option = document.querySelector("#manipulate-me");
     28 
     29 option.appendChild(document.createTextNode("a"));
     30 option.appendChild(document.createElement("br"));
     31 option.appendChild(document.createTextNode("b"));
     32 </script>