From 8f22e6a2650d22119d2759e38dbb28432895eed4 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 24 May 2017 11:12:57 -0700 Subject: [PATCH] Add webview example to nativeWindowOpen docs --- docs/api/window-open.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/api/window-open.md b/docs/api/window-open.md index ab7f4e649173..25bea577cee6 100644 --- a/docs/api/window-open.md +++ b/docs/api/window-open.md @@ -46,12 +46,22 @@ has to be a field of `BrowserWindow`'s options. Sends a message to the parent window with the specified origin or `*` for no origin preference. -### Use Native `window.open()` +### Using Chrome's `window.open()` implementation -If you want to use native `window.open()` implementation, pass `nativeWindowOpen: true` in `webPreferences` option. -Native `window.open()` allows synchronous access to opened windows so it is convenient choice if you need to open a dialog or a preferences window. +If you want to use Chrome's built-in `window.open()` implementation, set +`nativeWindowOpen` to `true` in the `webPreferences` options object. -The creation of the `BrowserWindow` is customizable in `WebContents`'s `new-window` event. +Native `window.open()` allows synchronous access to opened windows so it is +convenient choice if you need to open a dialog or a preferences window. + +This option can also be set on `` tags as well: + +```html + +``` + +The creation of the `BrowserWindow` is customizable via `WebContents`'s +`new-window` event. ```javascript // main process