From 549ec51bce2b493d73e23bdb4dda9d16ac3301f3 Mon Sep 17 00:00:00 2001 From: Sam Eaton Date: Wed, 10 Jun 2015 19:24:36 -0600 Subject: [PATCH] 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. --- docs/api/web-view-tag.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/api/web-view-tag.md b/docs/api/web-view-tag.md index 705014cf6a18..210b15f9e8b4 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.