feat: make async webContents / <webview> methods return a Promise (#18792)
This commit is contained in:
parent
632bbf948d
commit
deebde66f9
6 changed files with 32 additions and 35 deletions
|
@ -987,6 +987,8 @@ Returns `String` - The user agent for this web page.
|
|||
|
||||
* `css` String
|
||||
|
||||
Returns `Promise<void>`
|
||||
|
||||
Injects CSS into the current web page.
|
||||
|
||||
```js
|
||||
|
@ -1065,6 +1067,8 @@ Returns `Number` - the current zoom level.
|
|||
* `minimumLevel` Number
|
||||
* `maximumLevel` Number
|
||||
|
||||
Returns `Promise<void>`
|
||||
|
||||
Sets the maximum and minimum pinch-to-zoom level.
|
||||
|
||||
> **NOTE**: Visual zoom is disabled by default in Electron. To re-enable it, call:
|
||||
|
@ -1078,6 +1082,8 @@ Sets the maximum and minimum pinch-to-zoom level.
|
|||
* `minimumLevel` Number
|
||||
* `maximumLevel` Number
|
||||
|
||||
Returns `Promise<void>`
|
||||
|
||||
Sets the maximum and minimum layout-based (i.e. non-visual) zoom level.
|
||||
|
||||
#### `contents.undo()`
|
||||
|
@ -1139,6 +1145,8 @@ Executes the editing command `replaceMisspelling` in web page.
|
|||
|
||||
* `text` String
|
||||
|
||||
Returns `Promise<void>`
|
||||
|
||||
Inserts `text` to the focused element.
|
||||
|
||||
#### `contents.findInPage(text[, options])`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue