electron-types 40.0.0-beta.7 → 40.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/electron.d.ts +21 -24
- package/dist/version.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,11 +11,11 @@ The official `electron` package is ~200MB because it includes the Electron binar
|
|
|
11
11
|
Since this package only provides TypeScript types, install it as a dev dependency. **Install the version that matches your Electron version** (see [Version Matching](#version-matching)):
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npm install -D electron-types@40.0.0-beta.
|
|
14
|
+
npm install -D electron-types@40.0.0-beta.9
|
|
15
15
|
# or
|
|
16
|
-
yarn add -D electron-types@40.0.0-beta.
|
|
16
|
+
yarn add -D electron-types@40.0.0-beta.9
|
|
17
17
|
# or
|
|
18
|
-
pnpm add -D electron-types@40.0.0-beta.
|
|
18
|
+
pnpm add -D electron-types@40.0.0-beta.9
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Usage
|
package/dist/electron.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Electron 40.0.0-beta.
|
|
1
|
+
// Type definitions for Electron 40.0.0-beta.9
|
|
2
2
|
// Project: http://electronjs.org/
|
|
3
3
|
// Definitions by: The Electron Team <https://github.com/electron/electron>
|
|
4
4
|
// Definitions: https://github.com/electron/typescript-definitions
|
|
@@ -7287,7 +7287,7 @@ declare namespace Electron {
|
|
|
7287
7287
|
|
|
7288
7288
|
/**
|
|
7289
7289
|
* Emitted when the debugging session is terminated. This happens either when
|
|
7290
|
-
* `webContents` is closed or
|
|
7290
|
+
* `webContents` is closed or DevTools is invoked for the attached `webContents`.
|
|
7291
7291
|
*/
|
|
7292
7292
|
on(event: 'detach', listener: (event: Event,
|
|
7293
7293
|
/**
|
|
@@ -9785,7 +9785,7 @@ declare namespace Electron {
|
|
|
9785
9785
|
*
|
|
9786
9786
|
* * `nativeTheme.shouldUseDarkColors` will be `true` when accessed
|
|
9787
9787
|
* * Any UI Electron renders on Linux and Windows including context menus,
|
|
9788
|
-
*
|
|
9788
|
+
* DevTools, etc. will use the dark UI.
|
|
9789
9789
|
* * Any UI the OS renders on macOS including menus, window frames, etc. will use
|
|
9790
9790
|
* the dark UI.
|
|
9791
9791
|
* * The `prefers-color-scheme` CSS query will match `dark` mode.
|
|
@@ -9795,7 +9795,7 @@ declare namespace Electron {
|
|
|
9795
9795
|
*
|
|
9796
9796
|
* * `nativeTheme.shouldUseDarkColors` will be `false` when accessed
|
|
9797
9797
|
* * Any UI Electron renders on Linux and Windows including context menus,
|
|
9798
|
-
*
|
|
9798
|
+
* DevTools, etc. will use the light UI.
|
|
9799
9799
|
* * Any UI the OS renders on macOS including menus, window frames, etc. will use
|
|
9800
9800
|
* the light UI.
|
|
9801
9801
|
* * The `prefers-color-scheme` CSS query will match `light` mode.
|
|
@@ -15388,7 +15388,7 @@ declare namespace Electron {
|
|
|
15388
15388
|
static fromId(id: number): (WebContents) | (undefined);
|
|
15389
15389
|
/**
|
|
15390
15390
|
* An array of all `WebContents` instances. This will contain web contents for all
|
|
15391
|
-
* windows, webviews, opened
|
|
15391
|
+
* windows, webviews, opened DevTools, and DevTools extension background pages.
|
|
15392
15392
|
*/
|
|
15393
15393
|
static getAllWebContents(): WebContents[];
|
|
15394
15394
|
/**
|
|
@@ -15829,7 +15829,7 @@ declare namespace Electron {
|
|
|
15829
15829
|
addListener(event: 'devtools-opened', listener: () => void): this;
|
|
15830
15830
|
removeListener(event: 'devtools-opened', listener: () => void): this;
|
|
15831
15831
|
/**
|
|
15832
|
-
* Emitted when the
|
|
15832
|
+
* Emitted when the DevTools window instructs the webContents to reload
|
|
15833
15833
|
*/
|
|
15834
15834
|
on(event: 'devtools-reload-page', listener: () => void): this;
|
|
15835
15835
|
off(event: 'devtools-reload-page', listener: () => void): this;
|
|
@@ -17329,7 +17329,7 @@ declare namespace Electron {
|
|
|
17329
17329
|
*/
|
|
17330
17330
|
close(opts?: CloseOpts): void;
|
|
17331
17331
|
/**
|
|
17332
|
-
* Closes the
|
|
17332
|
+
* Closes the DevTools view.
|
|
17333
17333
|
*/
|
|
17334
17334
|
closeDevTools(): void;
|
|
17335
17335
|
/**
|
|
@@ -17575,11 +17575,11 @@ declare namespace Electron {
|
|
|
17575
17575
|
*/
|
|
17576
17576
|
isDestroyed(): boolean;
|
|
17577
17577
|
/**
|
|
17578
|
-
* Whether the
|
|
17578
|
+
* Whether the DevTools view is focused .
|
|
17579
17579
|
*/
|
|
17580
17580
|
isDevToolsFocused(): boolean;
|
|
17581
17581
|
/**
|
|
17582
|
-
* Whether the
|
|
17582
|
+
* Whether the DevTools view is opened.
|
|
17583
17583
|
*/
|
|
17584
17584
|
isDevToolsOpened(): boolean;
|
|
17585
17585
|
/**
|
|
@@ -17632,12 +17632,12 @@ declare namespace Electron {
|
|
|
17632
17632
|
*/
|
|
17633
17633
|
loadURL(url: string, options?: LoadURLOptions): Promise<void>;
|
|
17634
17634
|
/**
|
|
17635
|
-
* Opens the
|
|
17635
|
+
* Opens the DevTools.
|
|
17636
17636
|
*
|
|
17637
17637
|
* When `contents` is a `<webview>` tag, the `mode` would be `detach` by default,
|
|
17638
17638
|
* explicitly passing an empty `mode` can force using last used dock state.
|
|
17639
17639
|
*
|
|
17640
|
-
* On Windows, if Windows Control Overlay is enabled,
|
|
17640
|
+
* On Windows, if Windows Control Overlay is enabled, DevTools will be opened with
|
|
17641
17641
|
* `mode: 'detach'`.
|
|
17642
17642
|
*/
|
|
17643
17643
|
openDevTools(options?: OpenDevToolsOptions): void;
|
|
@@ -17797,23 +17797,20 @@ declare namespace Electron {
|
|
|
17797
17797
|
*/
|
|
17798
17798
|
setDevToolsTitle(title: string): void;
|
|
17799
17799
|
/**
|
|
17800
|
-
* Uses the `devToolsWebContents` as the target `WebContents` to show
|
|
17800
|
+
* Uses the `devToolsWebContents` as the target `WebContents` to show DevTools.
|
|
17801
17801
|
*
|
|
17802
17802
|
* The `devToolsWebContents` must not have done any navigation, and it should not
|
|
17803
17803
|
* be used for other purposes after the call.
|
|
17804
17804
|
*
|
|
17805
|
-
* By default Electron manages the
|
|
17805
|
+
* By default, Electron manages the DevTools by creating an internal `WebContents`
|
|
17806
17806
|
* with native view, which developers have very limited control of. With the
|
|
17807
17807
|
* `setDevToolsWebContents` method, developers can use any `WebContents` to show
|
|
17808
|
-
* the
|
|
17809
|
-
* tag.
|
|
17808
|
+
* the DevTools in it, such as `BrowserWindow` or `WebContentsView`.
|
|
17810
17809
|
*
|
|
17811
|
-
* Note that closing the
|
|
17812
|
-
* caller's responsibility to destroy `devToolsWebContents
|
|
17810
|
+
* Note that closing the DevTools does not destroy the `devToolsWebContents`, it is
|
|
17811
|
+
* the caller's responsibility to destroy `devToolsWebContents` manually.
|
|
17813
17812
|
*
|
|
17814
|
-
* An example of showing
|
|
17815
|
-
*
|
|
17816
|
-
* An example of showing devtools in a `BrowserWindow`:
|
|
17813
|
+
* An example of showing DevTools in a `BrowserWindow`:
|
|
17817
17814
|
*/
|
|
17818
17815
|
setDevToolsWebContents(devToolsWebContents: WebContents): void;
|
|
17819
17816
|
/**
|
|
@@ -21027,7 +21024,7 @@ declare namespace Electron {
|
|
|
21027
21024
|
*/
|
|
21028
21025
|
csp?: string;
|
|
21029
21026
|
/**
|
|
21030
|
-
* Name for isolated world. Useful in
|
|
21027
|
+
* Name for isolated world. Useful in DevTools.
|
|
21031
21028
|
*/
|
|
21032
21029
|
name?: string;
|
|
21033
21030
|
}
|
|
@@ -21136,7 +21133,7 @@ declare namespace Electron {
|
|
|
21136
21133
|
/**
|
|
21137
21134
|
* Whether to allow the extension to read local files over `file://` protocol and
|
|
21138
21135
|
* inject content scripts into `file://` pages. This is required e.g. for loading
|
|
21139
|
-
*
|
|
21136
|
+
* DevTools extensions on `file://` URLs. Defaults to false.
|
|
21140
21137
|
*/
|
|
21141
21138
|
allowFileAccess: boolean;
|
|
21142
21139
|
}
|
|
@@ -21884,13 +21881,13 @@ declare namespace Electron {
|
|
|
21884
21881
|
|
|
21885
21882
|
interface OpenDevToolsOptions {
|
|
21886
21883
|
/**
|
|
21887
|
-
* Opens the
|
|
21884
|
+
* Opens the DevTools with specified dock state, can be `left`, `right`, `bottom`,
|
|
21888
21885
|
* `undocked`, `detach`. Defaults to last used dock state. In `undocked` mode it's
|
|
21889
21886
|
* possible to dock back. In `detach` mode it's not.
|
|
21890
21887
|
*/
|
|
21891
21888
|
mode: ('left' | 'right' | 'bottom' | 'undocked' | 'detach');
|
|
21892
21889
|
/**
|
|
21893
|
-
* Whether to bring the opened
|
|
21890
|
+
* Whether to bring the opened DevTools window to the foreground. The default is
|
|
21894
21891
|
* `true`.
|
|
21895
21892
|
*/
|
|
21896
21893
|
activate?: boolean;
|
package/dist/version.json
CHANGED