Skip to content

Commit 8f75d67

Browse files
committed
confirm data is retained in elementFromPoint
1 parent 1bcf267 commit 8f75d67

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
@@ -327,6 +327,17 @@ test "Browser.HTML.Document" {
327327
.{ "elems[0]", "[object HTMLDivElement]" },
328328
}, .{});
329329

330+
try runner.testCases(&.{
331+
.{ "let a = document.createElement('a')", null },
332+
.{ "a.href = \"https://lightpanda.io\"", null },
333+
.{ "a.getClientRects()", null }, // Note this will be placed after the div of previous test
334+
.{ "let a_again = document.elementFromPoint(1.5, 0.5)", null },
335+
.{ "a_again", "[object HTMLAnchorElement]" },
336+
.{ "a_again.href", "https://lightpanda.io" },
337+
.{ "let a_agains = document.elementsFromPoint(1.5, 0.5)", null },
338+
.{ "a_agains[0].href", "https://lightpanda.io" },
339+
}, .{});
340+
330341
try runner.testCases(&.{
331342
.{ "!document.all", "true" },
332343
.{ "!!document.all", "false" },

0 commit comments

Comments
 (0)