mirror of
https://github.com/electron/electron.git
synced 2026-01-26 07:48:08 -05:00
Make sure chrome.devtools.inspectedWindow.tabId is set
This commit is contained in:
@@ -655,6 +655,11 @@ void WebContents::DevToolsOpened() {
|
||||
isolate(), managed_web_contents()->GetDevToolsWebContents());
|
||||
devtools_web_contents_.Reset(isolate(), handle.ToV8());
|
||||
|
||||
// Set inspected tabID.
|
||||
base::FundamentalValue tab_id(ID());
|
||||
managed_web_contents()->CallClientFunction(
|
||||
"DevToolsAPI.setInspectedTabId", &tab_id, nullptr, nullptr);
|
||||
|
||||
// Inherit owner window in devtools.
|
||||
if (owner_window())
|
||||
handle->SetOwnerWindow(managed_web_contents()->GetDevToolsWebContents(),
|
||||
|
||||
Reference in New Issue
Block a user