confirm data is retained in elementFromPoint

This commit is contained in:
sjorsdonkers
2025-05-15 10:51:13 +02:00
committed by Sjors
parent b87003427c
commit 59b33faf61

View File

@@ -327,6 +327,17 @@ test "Browser.HTML.Document" {
.{ "elems[0]", "[object HTMLDivElement]" }, .{ "elems[0]", "[object HTMLDivElement]" },
}, .{}); }, .{});
try runner.testCases(&.{
.{ "let a = document.createElement('a')", null },
.{ "a.href = \"https://lightpanda.io\"", null },
.{ "a.getClientRects()", null }, // Note this will be placed after the div of previous test
.{ "let a_again = document.elementFromPoint(1.5, 0.5)", null },
.{ "a_again", "[object HTMLAnchorElement]" },
.{ "a_again.href", "https://lightpanda.io" },
.{ "let a_agains = document.elementsFromPoint(1.5, 0.5)", null },
.{ "a_agains[0].href", "https://lightpanda.io" },
}, .{});
try runner.testCases(&.{ try runner.testCases(&.{
.{ "!document.all", "true" }, .{ "!document.all", "true" },
.{ "!!document.all", "false" }, .{ "!!document.all", "false" },