Skip to content

Commit 62093c5

Browse files
committed
confirm data is retained in elementFromPoint
1 parent e010d0b commit 62093c5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/browser/html/document.zig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,4 +292,15 @@ test "Browser.HTML.Document" {
292292
.{ "elems.length", "1" },
293293
.{ "elems[0]", "[object HTMLDivElement]" },
294294
}, .{});
295+
296+
try runner.testCases(&.{
297+
.{ "let a = document.createElement('a')", null },
298+
.{ "a.href = \"https://lightpanda.io\"", null },
299+
.{ "a.getClientRects()", null }, // Note this will be placed after the div of previous test
300+
.{ "let a_again = document.elementFromPoint(1.5, 0.5)", null },
301+
.{ "a_again", "[object HTMLAnchorElement]" },
302+
.{ "a_again.href", "https://lightpanda.io" },
303+
.{ "let a_agains = document.elementsFromPoint(1.5, 0.5)", null },
304+
.{ "a_agains[0].href", "https://lightpanda.io" },
305+
}, .{});
295306
}

0 commit comments

Comments
 (0)