https://github.com/web-platform-tests/wpt
Raw File
Tip revision: d3d5233de66e6f5c43434262ab0f86a8f9fd2a51 authored by Robert Ma on 05 October 2018, 16:01:01 UTC
Test unicode: ABC~ยคโ€ขโ˜…ๆ˜Ÿ๐ŸŒŸๆ˜Ÿโ˜…โ€ขยค~XYZ
Tip revision: d3d5233
form-elements-nameditem-02.html
<!DOCTYPE html>
<title>form.elements: parsing</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-form-elements">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#parsing-main-intr">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<div id="test">
<form id=form>
<table>
<tr>
<td><input type="radio" name="radio1" id="r1" value=1></td>
<td><input type="radio" name="radio2" id="r2" value=2></td>
<input type="radio"  name="radio0" id="r0" value=0>
</tr>
</table>
</form>
</div>
<script>
test(function() {
  var form = document.getElementById("form");
  assert_array_equals(form.elements,
                      [document.getElementById("r0"),
                       document.getElementById("r1"),
                       document.getElementById("r2")]);
}, "form.elements should work correctly in the face of table syntax errors")
</script>
back to top