feat: webFrameMain.fromFrameToken (#47942)

* feat: webFrameMain.fromFrameToken

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* refactor: return null instead of undefined

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* docs: mention renderer webFrame property

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* chore: undo null->undefined in wfm.fromId api this will be updated in another pr

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
This commit is contained in:
trop[bot] 2025-08-06 19:39:56 +02:00 committed by GitHub
commit a7b6145f3b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 55 additions and 3 deletions

View file

@ -1,7 +1,7 @@
import { IpcMainImpl } from '@electron/internal/browser/ipc-main-impl';
import { MessagePortMain } from '@electron/internal/browser/message-port-main';
const { WebFrameMain, fromId } = process._linkedBinding('electron_browser_web_frame_main');
const { WebFrameMain, fromId, fromFrameToken } = process._linkedBinding('electron_browser_web_frame_main');
Object.defineProperty(WebFrameMain.prototype, 'ipc', {
get () {
@ -43,5 +43,6 @@ WebFrameMain.prototype.postMessage = function (...args) {
};
export default {
fromId
fromId,
fromFrameToken
};