electron-types 42.11.2 → 42.11.3
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 +36 -11
- package/dist/version.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,11 +14,11 @@ The official `electron` package is ~200MB because it includes the Electron binar
|
|
|
14
14
|
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)):
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
npm install -D electron-types@42.11.
|
|
17
|
+
npm install -D electron-types@42.11.3
|
|
18
18
|
# or
|
|
19
|
-
yarn add -D electron-types@42.11.
|
|
19
|
+
yarn add -D electron-types@42.11.3
|
|
20
20
|
# or
|
|
21
|
-
pnpm add -D electron-types@42.11.
|
|
21
|
+
pnpm add -D electron-types@42.11.3
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Usage
|
package/dist/electron.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Electron 42.11.
|
|
1
|
+
// Type definitions for Electron 42.11.3
|
|
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
|
|
@@ -13297,8 +13297,12 @@ declare namespace Electron {
|
|
|
13297
13297
|
* is available and `useSystemPicker` is set to `true`, the handler will not be
|
|
13298
13298
|
* invoked.
|
|
13299
13299
|
*
|
|
13300
|
-
* Passing a WebFrameMain object as a video or audio stream
|
|
13301
|
-
*
|
|
13300
|
+
* Passing a WebFrameMain object as a video or audio stream captures the whole
|
|
13301
|
+
* `webContents` that contains that frame (the tab), not just the frame:
|
|
13302
|
+
* `request.frame` from an `<iframe>` therefore grants that iframe a capture of the
|
|
13303
|
+
* page that embeds it. Check `request.frame` before using it this way, and note
|
|
13304
|
+
* that the callback throws if the frame has been destroyed by the time it is
|
|
13305
|
+
* called.
|
|
13302
13306
|
*
|
|
13303
13307
|
* Passing `null` instead of a function resets the handler to its default state.
|
|
13304
13308
|
*/
|
|
@@ -18038,7 +18042,9 @@ declare namespace Electron {
|
|
|
18038
18042
|
* The identifier of a WebContents stream. This identifier can be used with
|
|
18039
18043
|
* `navigator.mediaDevices.getUserMedia` using a `chromeMediaSource` of `tab`. The
|
|
18040
18044
|
* identifier is restricted to the web contents that it is registered to and is
|
|
18041
|
-
* only valid for 10 seconds.
|
|
18045
|
+
* only valid for 10 seconds. The `desktop` source only accepts screen and window
|
|
18046
|
+
* identifiers from `desktopCapturer.getSources`; to capture a WebContents use this
|
|
18047
|
+
* identifier with the `tab` source, or `ses.setDisplayMediaRequestHandler`.
|
|
18042
18048
|
*/
|
|
18043
18049
|
getMediaSourceId(requestWebContents: WebContents): string;
|
|
18044
18050
|
/**
|
|
@@ -19266,8 +19272,10 @@ declare namespace Electron {
|
|
|
19266
19272
|
*/
|
|
19267
19273
|
nodeIntegrationInSubFrames?: boolean;
|
|
19268
19274
|
/**
|
|
19269
|
-
* Whether node integration is enabled in web workers. Default is `false`.
|
|
19270
|
-
*
|
|
19275
|
+
* Whether node integration is enabled in web workers. Default is `false`. Only
|
|
19276
|
+
* workers created by a frame that itself has access to Node.js (the main frame, or
|
|
19277
|
+
* any frame when `nodeIntegrationInSubFrames` is enabled) get it. More about this
|
|
19278
|
+
* can be found in Multithreading.
|
|
19271
19279
|
*/
|
|
19272
19280
|
nodeIntegrationInWorker?: boolean;
|
|
19273
19281
|
/**
|
|
@@ -19832,6 +19840,10 @@ declare namespace Electron {
|
|
|
19832
19840
|
removeEventListener(event: 'close', listener: (event: DOMEvent) => void): this;
|
|
19833
19841
|
/**
|
|
19834
19842
|
* Fired when the guest page has sent an asynchronous message to embedder page.
|
|
19843
|
+
* `frameId` does not tell the embedder which document sent the message; when that
|
|
19844
|
+
* matters, have the guest use `ipcRenderer.send()` and handle the guest
|
|
19845
|
+
* `webContents`' `ipc-message` event in the main process, where
|
|
19846
|
+
* `event.senderFrame` identifies the sender.
|
|
19835
19847
|
*
|
|
19836
19848
|
* With `sendToHost` method and `ipc-message` event you can communicate between
|
|
19837
19849
|
* guest page and embedder page:
|
|
@@ -20214,7 +20226,9 @@ declare namespace Electron {
|
|
|
20214
20226
|
unselect(): void;
|
|
20215
20227
|
/**
|
|
20216
20228
|
* A `boolean`. When this attribute is present the guest page will be allowed to
|
|
20217
|
-
* open new windows.
|
|
20229
|
+
* open new windows, whether through `window.open()` or a link opened into a new
|
|
20230
|
+
* window (for example a modifier-clicked or `target="_blank"` link). Popups are
|
|
20231
|
+
* disabled by default.
|
|
20218
20232
|
*/
|
|
20219
20233
|
allowpopups: boolean;
|
|
20220
20234
|
/**
|
|
@@ -21630,6 +21644,15 @@ declare namespace Electron {
|
|
|
21630
21644
|
* The blocked path attempting to be accessed.
|
|
21631
21645
|
*/
|
|
21632
21646
|
path: string;
|
|
21647
|
+
/**
|
|
21648
|
+
* The frame that initiated access. May be `null` if the frame has since been
|
|
21649
|
+
* destroyed.
|
|
21650
|
+
*/
|
|
21651
|
+
frame: (WebFrameMain) | (null);
|
|
21652
|
+
/**
|
|
21653
|
+
* The WebContents that contains `frame`.
|
|
21654
|
+
*/
|
|
21655
|
+
webContents: (WebContents) | (null);
|
|
21633
21656
|
}
|
|
21634
21657
|
|
|
21635
21658
|
interface FindInPageOptions {
|
|
@@ -23008,7 +23031,8 @@ declare namespace Electron {
|
|
|
23008
23031
|
*/
|
|
23009
23032
|
embeddingOrigin?: string;
|
|
23010
23033
|
/**
|
|
23011
|
-
* The
|
|
23034
|
+
* The origin of the requesting frame, for `media`, `hid`, `usb` and `serial`
|
|
23035
|
+
* checks.
|
|
23012
23036
|
*/
|
|
23013
23037
|
securityOrigin?: string;
|
|
23014
23038
|
/**
|
|
@@ -23016,8 +23040,8 @@ declare namespace Electron {
|
|
|
23016
23040
|
*/
|
|
23017
23041
|
mediaType?: ('video' | 'audio' | 'unknown');
|
|
23018
23042
|
/**
|
|
23019
|
-
* The last URL the requesting frame loaded.
|
|
23020
|
-
*
|
|
23043
|
+
* The last URL the requesting frame loaded. Not provided when the check is not
|
|
23044
|
+
* made on behalf of a document (for example for a service worker).
|
|
23021
23045
|
*/
|
|
23022
23046
|
requestingUrl?: string;
|
|
23023
23047
|
/**
|
|
@@ -23625,7 +23649,8 @@ declare namespace Electron {
|
|
|
23625
23649
|
/**
|
|
23626
23650
|
* If a string is specified, can be `loopback` or `loopbackWithMute`. Specifying a
|
|
23627
23651
|
* loopback device will capture system audio, and is currently only supported on
|
|
23628
|
-
* Windows. If a WebFrameMain is specified, will capture audio from
|
|
23652
|
+
* Windows. If a WebFrameMain is specified, will capture audio from the
|
|
23653
|
+
* `webContents` that contains that frame.
|
|
23629
23654
|
*/
|
|
23630
23655
|
audio?: (('loopback' | 'loopbackWithMute')) | (WebFrameMain);
|
|
23631
23656
|
/**
|
package/dist/version.json
CHANGED