1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[test] [1] instead of item(1) in getElementsByClassName

When searching docs it is meaningful.
This commit is contained in:
Witold Filipczyk 2024-10-02 20:30:36 +02:00
parent 2f375ecb1e
commit aa1622260d

View File

@ -13,7 +13,7 @@ First Name: <input name="fname" type="text" value="Doug">
<script>
function myFunction() {
var x = document.getElementsByClassName("test").item(1).outerHTML;
var x = document.getElementsByClassName("test")[1].outerHTML;
console.assert(x === '<button onclick="myFunction()" class="test">Try it</button>', x);
}