From 59b33faf61b0d01aa318225ded7b3812469ff1e7 Mon Sep 17 00:00:00 2001 From: sjorsdonkers <72333389+sjorsdonkers@users.noreply.github.com> Date: Thu, 15 May 2025 10:51:13 +0200 Subject: [PATCH] confirm data is retained in elementFromPoint --- src/browser/html/document.zig | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/browser/html/document.zig b/src/browser/html/document.zig index cf4e34fb..f2265bfb 100644 --- a/src/browser/html/document.zig +++ b/src/browser/html/document.zig @@ -327,6 +327,17 @@ test "Browser.HTML.Document" { .{ "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(&.{ .{ "!document.all", "true" }, .{ "!!document.all", "false" },