tor-browser

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

reset-algorithm-rendering.html (906B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3 <title>Invalidation test on resetting &lt;select></title>
      4 <link rel="help" href="https://html.spec.whatwg.org/C/#the-select-element:concept-form-reset-control">
      5 <link rel="help" href="http://crbug.com/1087031">
      6 <link rel="match" href="reset-algorithm-rendering-ref.html">
      7 <body>
      8 
      9 <form>
     10 <select>
     11 <option>Default</option>
     12 <option>Another</option>
     13 </select>
     14 
     15 <select>
     16 <option>Another</option>
     17 <option selected>Default</option>
     18 </select>
     19 
     20 <select multiple>
     21 <option>option 1</option>
     22 <option>option 2</option>
     23 </select>
     24 </form>
     25 
     26 <script>
     27 const selects = document.querySelectorAll('select');
     28 selects[0].selectedIndex = 1;
     29 selects[1].selectedIndex = 0;
     30 selects[2].options[1].selected = true;
     31 
     32 document.documentElement.addEventListener('TestRendered', e => {
     33  document.querySelector('form').reset();
     34  e.target.removeAttribute('class');
     35 });
     36 </script>
     37 
     38 </body>
     39 </html>