Skip to content

Commit f1c40de

Browse files
asamuzaKdomenic
authored andcommitted
Create ParentNode-querySelector-nested.html
1 parent f2a505d commit f1c40de

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<title>querySelector on multi-level query selecting</title>
3+
<meta charset="utf-8">
4+
<script src="/resources/testharness.js"></script>
5+
<script src="/resources/testharnessreport.js"></script>
6+
<!-- Regression test for https://github.com/jsdom/jsdom/issues/#3928 -->
7+
8+
<div>
9+
<span id="span1">Actions</span>
10+
<ul>
11+
<li>
12+
<a href="/">
13+
<span id="span2">Link</span>
14+
</a>
15+
</li>
16+
</ul>
17+
</div>
18+
19+
<script>
20+
"use strict";
21+
22+
test(() => {
23+
const target = document.getElementById("span2");
24+
const anchor = document.querySelector("a");
25+
const span = anchor.querySelector("span");
26+
assert_equals(span, target);
27+
});
28+
</script>

0 commit comments

Comments
 (0)