summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/forms/the-output-element/output-setcustomvalidity.html
blob: 1166eeb610fc4a2c4b2e95c16843fbb5065354e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE HTML>
<title>output setCustomValidity</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<output id='output_test'></output>

<script>

test(() => {
  let elem = document.getElementById("output_test");
  assert_false(elem.validity.customError);
  elem.setCustomValidity("custom error");
  assert_true(elem.validity.customError);
}, "output setCustomValidity is correct")

</script>