Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset=utf-8>
<title>Test for constraint validation of form controls not in documents</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
test(function() {
var input = document.createElement('input');
input.required = true;
assert_false(input.checkValidity());
}, "Should validate input not in document");
test(function() {
var textarea = document.createElement('textarea');
textarea.required = true;
assert_false(textarea.checkValidity());
}, "Should validate textarea not in document");
</script>