Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/embedded-content/the-object-element/object-constraint-validation.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>The object element's constraint validation.</title>
<link rel="author" title="Peng Zhou" href="mailto:zhoupeng.1996@bytedance.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<object id="element"></object>
<script>
function check() {
assert_false(element.willValidate);
assert_true(element.checkValidity());
assert_true(element.reportValidity());
}
test(() => {
check();
element.setCustomValidity("custom error");
check();
}, "the object element's constraint validation is correct")
</script>