Skip to content

Commit 5bc26a2

Browse files
Apply suggestions from code review
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
1 parent 95ab764 commit 5bc26a2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/api/browser-window.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,9 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
348348
You can access this context in the dev tools by selecting the
349349
'Electron Isolated Context' entry in the combo box at the top of the
350350
Console tab.
351-
* `worldSafeExecuteJavaScript` Boolean (optional) - Whether to ensure JS values
352-
can't unsafely cross worlds when using `webFrame.executeJavaScript`. The default
353-
is `false` though this will be irreversibly be changing to `true` in Electron 12.
351+
* `worldSafeExecuteJavaScript` Boolean (optional) - If true, values returned from `webFrame.executeJavaScript` will be sanitized to ensure JS values
352+
can't unsafely cross between worlds when using `contextIsolation`. The default
353+
is `false`. In Electron 12, the default will be changed to `true`. _Deprecated_
354354
* `nativeWindowOpen` Boolean (optional) - Whether to use native
355355
`window.open()`. Defaults to `false`. Child windows will always have node
356356
integration disabled unless `nodeIntegrationInSubFrames` is true. **Note:** This option is currently

lib/renderer/api/web-frame.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ for (const name in binding) {
5858
// use a neat `keyof` here
5959
(WebFrame as any).prototype[name] = function (...args: Array<any>) {
6060
if (!worldSafeJS && name.startsWith('executeJavaScript')) {
61-
deprecate.log(`Security Warning: webFrame.${name} was called without worldSafeExecuteJavaScript set to true. This is considered unsafe and the default of worldSafeExecuteJavaScript will be changing to true in Electron 12.`);
61+
deprecate.log(`Security Warning: webFrame.${name} was called without worldSafeExecuteJavaScript enabled. This is considered unsafe. worldSafeExecuteJavaScript will be enabled by default in Electron 12.`);
6262
}
6363
return binding[name](this.context, ...args);
6464
};

0 commit comments

Comments
 (0)