diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index e4cabd52b3b4..add5cfff8ba9 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -905,14 +905,16 @@ Returns a `String` represents the user agent for this page. Injects CSS into this page. -### WebContents.executeJavaScript(code, userGesture) +### WebContents.executeJavaScript(code[, userGesture]) * `code` String -* `userGesture` Boolean - Default false +* `userGesture` Boolean -Evaluates `code` in page. If `userGesture` is set will create user gesture context, -HTML api like `requestFullScreen` which require user action can take advantage -of this option for automation. +Evaluates `code` in page. + +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)