webContents: provide responses for executeJavscript method
This commit is contained in:
parent
d00490271b
commit
2b547bd44a
9 changed files with 113 additions and 13 deletions
|
@ -425,10 +425,12 @@ Returns a `String` representing the user agent for this web page.
|
|||
|
||||
Injects CSS into the current web page.
|
||||
|
||||
### `webContents.executeJavaScript(code[, userGesture])`
|
||||
### `webContents.executeJavaScript(code[, userGesture, callback])`
|
||||
|
||||
* `code` String
|
||||
* `userGesture` Boolean (optional)
|
||||
* `callback` Function (optional) - Called after script has been executed.
|
||||
* `result` Array
|
||||
|
||||
Evaluates `code` in page.
|
||||
|
||||
|
|
|
@ -279,10 +279,12 @@ Returns a `String` representing the user agent for guest page.
|
|||
|
||||
Injects CSS into the guest page.
|
||||
|
||||
### `<webview>.executeJavaScript(code, userGesture)`
|
||||
### `<webview>.executeJavaScript(code, userGesture, callback)`
|
||||
|
||||
* `code` String
|
||||
* `userGesture` Boolean - Default `false`.
|
||||
* `callback` Function (optional) - Called after script has been executed.
|
||||
* `result` Array
|
||||
|
||||
Evaluates `code` in page. If `userGesture` is set, it will create the user
|
||||
gesture context in the page. HTML APIs like `requestFullScreen`, which require
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue