Skip to content

Commit a0937b3

Browse files
committed
confirm data is retained in elementFromPoint
1 parent 0306fef commit a0937b3

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
@@ -298,6 +298,17 @@ test "Browser.HTML.Document" {
298298
.{ "elems[0]", "[object HTMLDivElement]" },
299299
}, .{});
300300

301+
try runner.testCases(&.{
302+
.{ "let a = document.createElement('a')", null },
303+
.{ "a.href = \"https://lightpanda.io\"", null },
304+
.{ "a.getClientRects()", null }, // Note this will be placed after the div of previous test
305+
.{ "let a_again = document.elementFromPoint(1.5, 0.5)", null },
306+
.{ "a_again", "[object HTMLAnchorElement]" },
307+
.{ "a_again.href", "https://lightpanda.io" },
308+
.{ "let a_agains = document.elementsFromPoint(1.5, 0.5)", null },
309+
.{ "a_agains[0].href", "https://lightpanda.io" },
310+
}, .{});
311+
301312
try runner.testCases(&.{
302313
.{ "!document.all", "true" },
303314
.{ "!!document.all", "false" },

0 commit comments

Comments
 (0)