summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/forms/the-input-element/radio-morphed.html
blob: b7b8658948d13e403742ae90a62f7f5744eae809 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE html>
<title>Morphed radio input</title>
<link rel="author" title="Kagami Sascha Rosylight" href="mailto:krosylight@mozilla.com">
<link rel="help" href="https://html.spec.whatwg.org/#radio-button-state-(type=radio)">

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<input id="radio" type="radio" name="name_7" checked>
<input id="text" name="name_7" checked>
<script>
  "use strict";

  test(() => {
    text.type = 'radio';
    assert_false(radio.checked);
  }, "Setting type attribute must unset checkedness of other elements");
</script>