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-button-element/button-willvalidate-readonly-attribute.html - WPT Dashboard Interop Dashboard
<!DOCTYPE HTML>
<meta charset="utf-8">
<title>Button element with "readonly" attribute shouldn't be barred from constraint validation</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<button id="implicitSubmitButton" readonly>1</button>
<button id="explicitSubmitButton" readonly type="submit">2</button>
<script>
test(() => {
assert_true(implicitSubmitButton.willValidate);
assert_true(explicitSubmitButton.willValidate);
});
</script>