From: Cheng Zhao Date: Thu, 6 Nov 2014 07:51:33 +0000 (+0800) Subject: docs: "preload" attribute of X-Git-Tag: v0.19.2~30^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=e28bdcdd46a9b904bc6f10af9b77d77970209ea2;p=electron.git docs: "preload" attribute of --- diff --git a/docs/api/web-view-tag.md b/docs/api/web-view-tag.md index 728fbc2d..0b5f6397 100644 --- a/docs/api/web-view-tag.md +++ b/docs/api/web-view-tag.md @@ -90,6 +90,20 @@ 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. +### preload + +```html + +``` + +Specifies a script that will be loaded before other scripts run in the guest +page. The protocol of script's URL must be either `file:` or `asar:`, because it +will be loaded by `require` in guest page under the hood. + +When the guest page doesn't have node integration this script will still have +access to all Node APIs, but global objects injected by Node will be deleted +after this script has done execution. + ## Methods ### ``.getUrl()