From cf14b9e762c099de47e636eacaa68269247c70e3 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Mon, 29 Dec 2025 10:35:05 +0100 Subject: [PATCH] add Document.hasFocus placeholder --- src/browser/webapi/Document.zig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/browser/webapi/Document.zig b/src/browser/webapi/Document.zig index d0490555..32024bb2 100644 --- a/src/browser/webapi/Document.zig +++ b/src/browser/webapi/Document.zig @@ -594,6 +594,11 @@ pub fn getAdoptedStyleSheets(self: *Document, page: *Page) !js.Object { return obj; } +pub fn hasFocus(_: *Document) bool { + log.debug(.not_implemented, "Document.hasFocus", .{}); + return true; +} + pub fn setAdoptedStyleSheets(self: *Document, sheets: js.Object) !void { self._adopted_style_sheets = try sheets.persist(); } @@ -675,6 +680,7 @@ pub const JsApi = struct { return page.window; } }.defaultView, null, .{ .cache = "defaultView" }); + pub const hasFocus = bridge.function(Document.hasFocus, .{}); }; const testing = @import("../../testing.zig");