From 4539a6f4d5c5c2e8eb63d374ccd89655ce3e291e Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 2 Feb 2017 10:49:05 -0800 Subject: [PATCH 1/2] Change wording from on to present --- docs/api/webview-tag.md | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/docs/api/webview-tag.md b/docs/api/webview-tag.md index fbf5d6d844f8..20f3d7b6439f 100644 --- a/docs/api/webview-tag.md +++ b/docs/api/webview-tag.md @@ -103,14 +103,15 @@ The `src` attribute can also accept data URLs, such as ### `autosize` ```html - + ``` -If "on", the `webview` container will automatically resize within the -bounds specified by the attributes `minwidth`, `minheight`, `maxwidth`, and -`maxheight`. These constraints do not impact the `webview` unless `autosize` is -enabled. When `autosize` is enabled, the `webview` container size cannot be less -than the minimum values or greater than the maximum. +When this attribute is present the `webview` container will automatically resize +within the bounds specified by the attributes `minwidth`, `minheight`, +`maxwidth`, and `maxheight`. These constraints do not impact the `webview` +unless `autosize` is enabled. When `autosize` is enabled, the `webview` +container size cannot be less than the minimum values or greater than the +maximum. ### `nodeintegration` @@ -118,8 +119,10 @@ than the minimum values or greater than the maximum. ``` -If "on", the guest page in `webview` will have node integration and can use node -APIs like `require` and `process` to access low level system resources. +When this attribute is present the guest page in `webview` will have node +integration and can use node APIs like `require` and `process` to access low +level system resources. Node integration is disabled by default in the guest +page. ### `plugins` @@ -127,7 +130,8 @@ APIs like `require` and `process` to access low level system resources. ``` -If "on", the guest page in `webview` will be able to use browser plugins. +When this attribute is present the guest page in `webview` will be able to use +browser plugins. Plugins are disabled by default. ### `preload` @@ -166,7 +170,8 @@ page is loaded, use the `setUserAgent` method to change the user agent. ``` -If "on", the guest page will have web security disabled. +When this attribute is present the guest page will have web security disabled. +Web security is enabled by default. ### `partition` @@ -192,7 +197,8 @@ value will fail with a DOM exception. ``` -If "on", the guest page will be allowed to open new windows. +When this attribute is present the guest page will be allowed to open new +windows. Popups are disabled by default. ### `webpreferences` @@ -249,8 +255,8 @@ webContents when a new url is loaded. ``` -Prevents the webview contents from resizing when the webview element itself is -resized. +When this attribute is present the `webview` contents will be prevented from +resizing when the `webview` element itself is resized. This can be used in combination with [`webContents.setSize`](web-contents.md#contentssetsizeoptions) to manually From 50b9dfa61abf6818b0f5421aea8807f93ee35427 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 2 Feb 2017 10:50:32 -0800 Subject: [PATCH 2/2] Use querySelector to make examples more portable --- docs/api/webview-tag.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/api/webview-tag.md b/docs/api/webview-tag.md index 20f3d7b6439f..4d6273948479 100644 --- a/docs/api/webview-tag.md +++ b/docs/api/webview-tag.md @@ -35,7 +35,7 @@ and displays a "loading..." message during the load time: ```html