From 54c8c3e3fcf7b632bc8e93ad881b47c41be6d7e5 Mon Sep 17 00:00:00 2001 From: leethomas Date: Fri, 1 Jan 2016 01:45:03 -0800 Subject: [PATCH] :memo: update webview docs to include devtools-* events --- atom/browser/api/atom_api_web_contents.cc | 2 +- docs/api/web-view-tag.md | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 08f159c34723..610fa2bb8d32 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -783,7 +783,7 @@ bool WebContents::IsDevToolsOpened() { bool WebContents::IsDevToolsFocused() { if (type_ == REMOTE) return false; - + return managed_web_contents()->GetView()->IsDevToolsViewFocused(); } diff --git a/docs/api/web-view-tag.md b/docs/api/web-view-tag.md index 0c79083c112d..79e759c8cb81 100644 --- a/docs/api/web-view-tag.md +++ b/docs/api/web-view-tag.md @@ -650,3 +650,15 @@ Emitted when a page's theme color changes. This is usually due to encountering a ```html ``` + +### Event: 'devtools-opened' + +Emitted when DevTools is opened. + +### Event: 'devtools-closed' + +Emitted when DevTools is closed. + +### Event: 'devtools-focused' + +Emitted when DevTools is focused / opened.