refactor: remove DevTools legacy UI patching (#40331)

This commit is contained in:
Shelley Vohr 2023-10-26 14:36:04 -04:00 committed by GitHub
parent 30fbcfca7b
commit 652f995128
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 35 additions and 327 deletions

View file

@ -297,10 +297,11 @@ describe('<webview> tag', function () {
const showPanelIntervalId = setInterval(function () {
if (!webContents.isDestroyed() && webContents.devToolsWebContents) {
webContents.devToolsWebContents.executeJavaScript('(' + function () {
const { UI } = (window as any);
const tabs = UI.InspectorView.instance().tabbedPane.tabs;
const { EUI } = (window as any);
const instance = EUI.InspectorView.InspectorView.instance();
const tabs = instance.tabbedPane.tabs;
const lastPanelId: any = tabs[tabs.length - 1].id;
UI.InspectorView.instance().showPanel(lastPanelId);
instance.showPanel(lastPanelId);
}.toString() + ')()');
} else {
clearInterval(showPanelIntervalId);