range-setattribute-value.html (827B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <meta charset="utf-8"> 4 <link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org"> 5 <link rel="help" href="https://html.spec.whatwg.org/multipage/input.html#the-input-element"> 6 <link rel="match" href="range-setattribute-value-ref.html"> 7 <title>range input element setAttribute value appearance</title> 8 9 <p>Test passes if the range element below visually has its slider at 2/10 from the left</p> 10 11 <script> 12 window.onload = () => { 13 14 const input = document.createElement('input'); 15 input.type = 'range'; 16 input.min = 0; 17 input.max = 10; 18 document.body.appendChild(input); 19 20 requestAnimationFrame(() => { 21 requestAnimationFrame(() => { 22 input.setAttribute('value', 2); 23 document.documentElement.classList.remove('reftest-wait'); 24 }); 25 }); 26 }; 27 </script>