feat: WebContents.focusedFrame (#45667)

feat: webContents.focusedFrame
This commit is contained in:
Sam Maddock 2025-03-04 11:38:58 -05:00 committed by GitHub
parent 54136042c6
commit 8c11764800
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 44 additions and 1 deletions

View file

@ -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 `<iframe>`, or `null` if nothing is focused.
[keyboardevent]: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent
[event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter
[SCA]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm