Remove Electron devtools closing
Summary: Follow up on D31992230 (2e7015388c) to replace `require('electron')` with `global.electronRequire('electron')`. However, during testing noticed that the Hermes debugger works just fine even with Electron DevTools open, so removed the logic altogether.
Reviewed By: aigoncharov
Differential Revision: D32167673
fbshipit-source-id: c6c6c07f07ac8c44e0f6959d56bf4c16725c186e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4cf1920e36
commit
2eaccff720
@@ -26,16 +26,6 @@ function createDevToolsNode(
|
||||
return existing;
|
||||
}
|
||||
|
||||
// It is necessary to deactivate chrome devtools in electron
|
||||
try {
|
||||
const electron = require('electron');
|
||||
if (electron.default) {
|
||||
electron.default.remote.getCurrentWindow().webContents.toggleDevTools();
|
||||
electron.default.remote.getCurrentWindow().webContents.closeDevTools();
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn('Failed to close Electron devtools: ', e);
|
||||
}
|
||||
const wrapper = document.createElement('div');
|
||||
wrapper.id = devToolsNodeId(url);
|
||||
wrapper.style.height = '100%';
|
||||
|
||||
Reference in New Issue
Block a user