summaryrefslogtreecommitdiff
path: root/test/js/dom-element-next_prev_ElementSibling.html
blob: edab28129238aecd5f8540207b224ea1e5643a7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<html>
<head>
<title>DOM previousElementSibling and nextElementSibling reference</title>
<!-- comment node should be skipped -->
<link rel="stylesheet" type="text/css" href="tst.css">
</head>
<body>
<h1>DOM previousElementSibling and nextElementSibling reference</h1>
<noscript><p>Javascript is disabled</p></noscript>
<!-- comment node should be skipped -->
<p><b>head.lastElementChild.previousElementSibling:</b> <script>document.write(document.head.lastElementChild.previousElementSibling.textContent);</script></p>
<!-- comment node should be skipped -->
<p><b>body.firstElementChild.nextElementSibling:</b> <script>document.write(document.body.firstElementChild.nextElementSibling.textContent);</script></p>
<h1>DOM nodes should be 'null' if not present</h1>
<p><b>head.firstElementChild.previousElementSibling:</b> <script>document.write(document.head.firstElementChild.previousElementSibling);</script></p>
<p><b>head.firstElementChild.nextElementSibling.nextElementSibling:</b> <script>document.write(document.head.firstElementChild.nextElementSibling.nextElementSibling);</script></p>
</body>
</html>