mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
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:
@@ -66,6 +66,16 @@ These methods can be accessed from the `webFrameMain` module:
|
||||
Returns `WebFrameMain | undefined` - A frame with the given process and routing IDs,
|
||||
or `undefined` if there is no WebFrameMain associated with the given IDs.
|
||||
|
||||
### `webFrameMain.fromFrameToken(processId, frameToken)`
|
||||
|
||||
* `processId` Integer - An `Integer` representing the internal ID of the process which owns the frame.
|
||||
* `frameToken` string - A `string` token identifying the unique frame. Can also
|
||||
be retrieved in the renderer process via
|
||||
[`webFrame.frameToken`](web-frame.md#webframeframetoken-readonly).
|
||||
|
||||
Returns `WebFrameMain | null` - A frame with the given process and frame token,
|
||||
or `null` if there is no WebFrameMain associated with the given IDs.
|
||||
|
||||
## Class: WebFrameMain
|
||||
|
||||
Process: [Main](../glossary.md#main-process)<br />
|
||||
|
||||
Reference in New Issue
Block a user