mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add BrowserWindow.isDevToolsOpened()
https://github.com/atom/electron/blob/master/docs/api/browser-window.md#winisdevtoolsopened
This commit is contained in:
@@ -44,6 +44,9 @@ app.on('ready', () => {
|
||||
// and load the index.html of the app.
|
||||
mainWindow.loadUrl(`file://${__dirname}/index.html`);
|
||||
|
||||
mainWindow.openDevTools()
|
||||
var opened: boolean = mainWindow.isDevToolsOpened()
|
||||
mainWindow.toggleDevTools()
|
||||
// Emitted when the window is closed.
|
||||
mainWindow.on('closed', () => {
|
||||
// Dereference the window object, usually you would store windows
|
||||
|
||||
Vendored
+4
@@ -356,6 +356,10 @@ declare module GitHubElectron {
|
||||
* Closes the developer tools.
|
||||
*/
|
||||
closeDevTools(): void;
|
||||
/**
|
||||
* Returns whether the developer tools are opened.
|
||||
*/
|
||||
isDevToolsOpened(): boolean;
|
||||
/**
|
||||
* Toggle the developer tools.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user