| <!DOCTYPE html> |
| <html> |
| <body> |
| <p>This tests accessing the first element in childNodes after accessing the second element by its id. |
| WebKit should retrieve each element correctly, and you should see 2 1 below:</p> |
| <span id="item"></span><span id="tests" style="display: none;">1<span id="item">2</span></span> |
| <script> |
| |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| var tests = document.querySelector('#tests'); |
| document.writeln(tests.childNodes['item'].textContent); |
| document.writeln(tests.childNodes[0].textContent); |
| |
| </script> |
| </body> |
| </html> |