feat: add event.senderFrame property returning the originating webFrameMain (#26764)

This commit is contained in:
Milan Burda 2020-12-10 00:34:06 +01:00 committed by GitHub
parent 9908cc363a
commit cec6378881
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 25 additions and 14 deletions

View file

@ -26,7 +26,7 @@ win.webContents.on(
)
```
You can also access frames of existing pages by using the `webFrame` property
You can also access frames of existing pages by using the `mainFrame` property
of [`WebContents`](web-contents.md).
```javascript
@ -57,8 +57,8 @@ These methods can be accessed from the `webFrameMain` module:
### `webFrameMain.fromId(processId, routingId)`
* `processId` Integer - An `Integer` representing the id of the process which owns the frame.
* `routingId` Integer - An `Integer` representing the unique frame id in the
* `processId` Integer - An `Integer` representing the internal ID of the process which owns the frame.
* `routingId` Integer - An `Integer` representing the unique frame ID in the
current renderer process. Routing IDs can be retrieved from `WebFrameMain`
instances (`frame.routingId`) and are also passed by frame
specific `WebContents` navigation events (e.g. `did-frame-navigate`).