docs: userGesture is optional
This commit is contained in:
parent
d455232eb1
commit
e135bcb5b7
1 changed files with 7 additions and 5 deletions
|
@ -905,14 +905,16 @@ Returns a `String` represents the user agent for this page.
|
||||||
|
|
||||||
Injects CSS into this page.
|
Injects CSS into this page.
|
||||||
|
|
||||||
### WebContents.executeJavaScript(code, userGesture)
|
### WebContents.executeJavaScript(code[, userGesture])
|
||||||
|
|
||||||
* `code` String
|
* `code` String
|
||||||
* `userGesture` Boolean - Default false
|
* `userGesture` Boolean
|
||||||
|
|
||||||
Evaluates `code` in page. If `userGesture` is set will create user gesture context,
|
Evaluates `code` in page.
|
||||||
HTML api like `requestFullScreen` which require user action can take advantage
|
|
||||||
of this option for automation.
|
In browser some HTML APIs like `requestFullScreen` can only be invoked if it
|
||||||
|
is started by user gesture, by specifying `userGesture` to `true` developers
|
||||||
|
can ignore this limitation.
|
||||||
|
|
||||||
### WebContents.setAudioMuted(muted)
|
### WebContents.setAudioMuted(muted)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue