]> khamidou — GitHub mirrors - electron.git/commitdiff
docs: userGesture is optional
authorCheng Zhao <zcbenz@gmail.com>
Mon, 3 Aug 2015 06:43:01 +0000 (14:43 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 3 Aug 2015 06:43:01 +0000 (14:43 +0800)
docs/api/browser-window.md

index e4cabd52b3b41bbe1593239b2ed6e31e02d5bcc6..add5cfff8ba9b24dfbcd40ca899f176431ced6f1 100644 (file)
@@ -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)