tor-browser

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

option-add-label-quirks.html (713B)


      1 <meta charset="utf-8">
      2 <title>OPTION's label attribute in SELECT -- Adding a label (quirks)</title>
      3 <link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#the-select-element-2">
      4 <link rel="match" href="option-label-ref.html">
      5 <meta name="assert" content="An option element is expected to be rendered by displaying the element's label when the document is in quirks mode">
      6 
      7 <select>
      8  <option>Element Text</option>
      9 </select>
     10 <br/>
     11 <select size="4">
     12  <option>Element Text</option>
     13 </select>
     14 <script>
     15 let options = document.querySelectorAll("option");
     16 options[0].getBoundingClientRect(); // force layout.
     17 for (let option of options) {
     18  option.setAttribute("label", "Label Text");
     19 }
     20 </script>