mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Merge pull request #4522 from deepak1556/async_execute_javascript_patch
webContents: provide responses for executeJavscript method
This commit is contained in:
@@ -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`
|
||||
|
||||
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`
|
||||
|
||||
Evaluates `code` in page. If `userGesture` is set, it will create the user
|
||||
gesture context in the page. HTML APIs like `requestFullScreen`, which require
|
||||
|
||||
Reference in New Issue
Block a user