Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33310441
D8369.1768808018.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8369.1768808018.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
Mon, Jan 19, 7:33 AM (45 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5955184
Default Alt Text
D8369.1768808018.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