From: Sam Eaton Date: Thu, 11 Jun 2015 01:24:36 +0000 (-0600) Subject: adds 'before using methods' example X-Git-Tag: v0.28.1~3^2~2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=549ec51bce2b493d73e23bdb4dda9d16ac3301f3;p=electron.git adds 'before using methods' example The document does not inform that the webview element has to be loaded before using the element's methods. It is not clear. --- diff --git a/docs/api/web-view-tag.md b/docs/api/web-view-tag.md index 705014cf..210b15f9 100644 --- a/docs/api/web-view-tag.md +++ b/docs/api/web-view-tag.md @@ -130,6 +130,14 @@ If "on", the guest page will have web security disabled. ## Methods +The webview element must be loaded before using the methods. +**Example** +```javascript +webview.addEventListener("dom-ready", function(){ + webview.openDevTools(); +}); +``` + ### ``.getUrl() Returns URL of guest page.