From 8c11764800c07604247b770b6bf7359d197d86bb Mon Sep 17 00:00:00 2001 From: Sam Maddock Date: Tue, 4 Mar 2025 11:38:58 -0500 Subject: [PATCH] feat: WebContents.focusedFrame (#45667) feat: webContents.focusedFrame --- docs/api/web-contents.md | 7 +++- .../browser/api/electron_api_web_contents.cc | 5 +++ shell/browser/api/electron_api_web_contents.h | 1 + spec/api-web-contents-spec.ts | 32 +++++++++++++++++++ 4 files changed, 44 insertions(+), 1 deletion(-) diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 1f0f7fb7c3d6..bcb733a8ad98 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -2391,9 +2391,14 @@ A [`WebFrameMain`](web-frame-main.md) property that represents the top frame of #### `contents.opener` _Readonly_ -A [`WebFrameMain`](web-frame-main.md) property that represents the frame that opened this WebContents, either +A [`WebFrameMain | null`](web-frame-main.md) property that represents the frame that opened this WebContents, either with open(), or by navigating a link with a target attribute. +#### `contents.focusedFrame` _Readonly_ + +A [`WebFrameMain | null`](web-frame-main.md) property that represents the currently focused frame in this WebContents. +Can be the top frame, an inner `