radio-morphed.html (610B)
1 <!DOCTYPE html> 2 <title>Morphed radio input</title> 3 <link rel="author" title="Kagami Sascha Rosylight" href="mailto:krosylight@mozilla.com"> 4 <link rel="help" href="https://html.spec.whatwg.org/#radio-button-state-(type=radio)"> 5 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <input id="radio" type="radio" name="name_7" checked> 9 <input id="text" name="name_7" checked> 10 <script> 11 "use strict"; 12 13 test(() => { 14 text.type = 'radio'; 15 assert_false(radio.checked); 16 }, "Setting type attribute must unset checkedness of other elements"); 17 </script>