Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3749317
D8369.id28363.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D8369.id28363.diff
View Options
diff --git a/desktop/flow-typed/npm/electron_v22.0.0.js b/desktop/flow-typed/npm/electron_v22.0.0.js
--- a/desktop/flow-typed/npm/electron_v22.0.0.js
+++ b/desktop/flow-typed/npm/electron_v22.0.0.js
@@ -240,6 +240,7 @@
};
declare export type MenuItemConstructorOptions = {
+ click?: () => void,
label?: string,
submenu?: $ReadOnlyArray<MenuItemConstructorOptions>,
type?: 'normal' | 'separator' | 'submenu' | 'checkbox' | 'radio',
@@ -439,6 +440,7 @@
event: T,
listener: $ElementType<WebContentsEvents, T>,
): void;
+ inspectSharedWorker(): void;
}
declare type WebContentsEvents = {
'did-finish-load': () => void,
diff --git a/desktop/src/main.js b/desktop/src/main.js
--- a/desktop/src/main.js
+++ b/desktop/src/main.js
@@ -29,6 +29,7 @@
'utf8',
);
+let mainWindow = null;
const setApplicationMenu = () => {
let mainMenu = [];
if (isMac) {
@@ -60,6 +61,14 @@
{ type: 'separator' },
{ role: 'togglefullscreen' },
{ role: 'toggleDevTools' },
+ {
+ label: 'Toggle Shared Worker Developer Tools',
+ click: () => {
+ if (mainWindow) {
+ mainWindow.webContents.inspectSharedWorker();
+ }
+ },
+ },
],
};
const windowMenu = {
@@ -87,7 +96,6 @@
Menu.setApplicationMenu(menu);
};
-let mainWindow = null;
const createMainWindow = (urlPath?: string) => {
const win = new BrowserWindow({
show: false,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 10, 9:19 PM (18 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2855394
Default Alt Text
D8369.id28363.diff (1 KB)
Attached To
Mode
D8369: [desktop] add option to toggle shared worker dev dev-tools
Attached
Detach File
Event Timeline
Log In to Comment