Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/forms/the-input-element/range-setattribute-value.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org">
<link rel="match" href="range-setattribute-value-ref.html">
<title>range input element setAttribute value appearance</title>
<p>Test passes if the range element below visually has its slider at 2/10 from the left</p>
<script>
window.onload = () => {
const input = document.createElement('input');
input.type = 'range';
input.min = 0;
input.max = 10;
document.body.appendChild(input);
requestAnimationFrame(() => {
requestAnimationFrame(() => {
input.setAttribute('value', 2);
document.documentElement.classList.remove('reftest-wait');
});
});
};
</script>