feat: add <webview>.sendToFrame() / frameId to 'ipc-message' event (#30451)
This commit is contained in:
parent
be43996d35
commit
501ac15b1d
4 changed files with 43 additions and 3 deletions
|
@ -606,6 +606,21 @@ listening to the `channel` event with the [`ipcRenderer`](ipc-renderer.md) modul
|
|||
See [webContents.send](web-contents.md#contentssendchannel-args) for
|
||||
examples.
|
||||
|
||||
### `<webview>.sendToFrame(frameId, channel, ...args)`
|
||||
|
||||
* `frameId` [number, number] - `[processId, frameId]`
|
||||
* `channel` String
|
||||
* `...args` any[]
|
||||
|
||||
Returns `Promise<void>`
|
||||
|
||||
Send an asynchronous message to renderer process via `channel`, you can also
|
||||
send arbitrary arguments. The renderer process can handle the message by
|
||||
listening to the `channel` event with the [`ipcRenderer`](ipc-renderer.md) module.
|
||||
|
||||
See [webContents.sendToFrame](web-contents.md#contentssendtoframeframeid-channel-args) for
|
||||
examples.
|
||||
|
||||
### `<webview>.sendInputEvent(event)`
|
||||
|
||||
* `event` [MouseInputEvent](structures/mouse-input-event.md) | [MouseWheelInputEvent](structures/mouse-wheel-input-event.md) | [KeyboardInputEvent](structures/keyboard-input-event.md)
|
||||
|
@ -920,6 +935,7 @@ webview.addEventListener('close', () => {
|
|||
|
||||
Returns:
|
||||
|
||||
* `frameId` [number, number] - pair of `[processId, frameId]`.
|
||||
* `channel` String
|
||||
* `args` any[]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue