mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Add a test for getElementsByName
This commit is contained in:
parent
f8f9d203f5
commit
65d2ea2ffd
2 changed files with 10 additions and 2 deletions
|
@ -3,9 +3,9 @@
|
|||
<script src="test_bindings.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="first">fffff<br><br><br><br>fffffffffffffffff</div>
|
||||
<div id="first" name="test">fffff<br><br><br><br>fffffffffffffffff</div>
|
||||
<div id="second">ggg</div>
|
||||
<span id="third">hhhhhhhh</span>
|
||||
<span id="third" name="test">hhhhhhhh</span>
|
||||
<div id="fourth">iiiiiiiiiiiiiiiiiii</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -43,6 +43,14 @@ window.alert(tags[0].getClientRects());
|
|||
window.alert(tags[1]);
|
||||
window.alert(tags[2]);
|
||||
window.alert(tags[3]);
|
||||
let tags = document.getElementsByName("test");
|
||||
window.alert(tags);
|
||||
window.alert(tags.length);
|
||||
window.alert(tags[0]);
|
||||
window.alert(tags[0].tagName);
|
||||
window.alert(tags[1]);
|
||||
window.alert(tags[1].tagName);
|
||||
window.alert(tags[2]);
|
||||
|
||||
window.alert("DOMParser:");
|
||||
window.alert(DOMParser);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue