1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:07:34 +00:00

LibWeb: Implement document.elementFromPoint()

This function uses our existing hit testing code to determine the
topmost element at the given coordinates relative to the viewport.
This commit is contained in:
Tim Ledbetter 2024-02-06 06:02:51 +00:00 committed by Andreas Kling
parent c732e03ea0
commit 69df94ec5c
5 changed files with 75 additions and 0 deletions

View file

@ -116,6 +116,9 @@ interface Document : Node {
// https://www.w3.org/TR/web-animations-1/#extensions-to-the-document-interface
readonly attribute DocumentTimeline timeline;
// https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface
Element? elementFromPoint(double x, double y);
};
dictionary ElementCreationOptions {