gecko/layout/reftests/css-invalid/button/button-dyn-disabled.html

22 lines
605 B
HTML
Raw Normal View History

<!DOCTYPE html>
<html class="reftest-wait">
<!-- Test: if button is disabled and invalid, it is barred from constraint
validation and should not be affected by :invalid pseudo-class. -->
<style>
button { background-color: green; }
button:invalid { background-color: red; }
</style>
<script>
function onLoadHandler()
{
var e = document.getElementById('b');
e.setCustomValidity('foo');
e.disabled = 'true';
document.documentElement.className='';
}
</script>
<body onload="onLoadHandler();">
<button id='b'></button>
</body>
</html>