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.