electron-types 44.9.3 → 44.10.0
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 +91 -2
- 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@44.
|
|
17
|
+
npm install -D electron-types@44.10.0
|
|
18
18
|
# or
|
|
19
|
-
yarn add -D electron-types@44.
|
|
19
|
+
yarn add -D electron-types@44.10.0
|
|
20
20
|
# or
|
|
21
|
-
pnpm add -D electron-types@44.
|
|
21
|
+
pnpm add -D electron-types@44.10.0
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Usage
|
package/dist/electron.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Electron 44.
|
|
1
|
+
// Type definitions for Electron 44.10.0
|
|
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
|
|
@@ -11635,6 +11635,14 @@ declare namespace Electron {
|
|
|
11635
11635
|
|
|
11636
11636
|
// Docs: https://electronjs.org/docs/api/structures/preload-script
|
|
11637
11637
|
|
|
11638
|
+
/**
|
|
11639
|
+
* Glob patterns for URLs the script will not run in.
|
|
11640
|
+
*/
|
|
11641
|
+
excludeGlobs?: string[];
|
|
11642
|
+
/**
|
|
11643
|
+
* Match patterns for URLs the script will not run in.
|
|
11644
|
+
*/
|
|
11645
|
+
excludeMatches?: string[];
|
|
11638
11646
|
/**
|
|
11639
11647
|
* Path of the script file. Must be an absolute path.
|
|
11640
11648
|
*/
|
|
@@ -11643,6 +11651,29 @@ declare namespace Electron {
|
|
|
11643
11651
|
* Unique ID of preload script.
|
|
11644
11652
|
*/
|
|
11645
11653
|
id: string;
|
|
11654
|
+
/**
|
|
11655
|
+
* Glob patterns applied after `matches`. A URL must also match one of these globs.
|
|
11656
|
+
* `*` matches any sequence of characters and `?` matches any single character.
|
|
11657
|
+
*/
|
|
11658
|
+
includeGlobs?: string[];
|
|
11659
|
+
/**
|
|
11660
|
+
* Match patterns for URLs the script runs in. A custom protocol can be used if its
|
|
11661
|
+
* scheme is registered as `standard` with `protocol.registerSchemesAsPrivileged`.
|
|
11662
|
+
* To filter documents served from a non-standard scheme, use `includeGlobs` or
|
|
11663
|
+
* `excludeGlobs`, which match against the whole URL. If omitted, the script runs
|
|
11664
|
+
* for all URLs not excluded by other filters.
|
|
11665
|
+
*/
|
|
11666
|
+
matches?: string[];
|
|
11667
|
+
/**
|
|
11668
|
+
* Whether a document whose URL has no origin of its own (`about:`, `blob:`,
|
|
11669
|
+
* `data:` or `filesystem:`) is matched by the origin of the frame that created it
|
|
11670
|
+
* instead of by its URL. This includes documents with an opaque origin, such as a
|
|
11671
|
+
* `data:` frame or a sandboxed `<iframe srcdoc>`. For example, an `about:blank`
|
|
11672
|
+
* popup opened by `https://example.com/page` is matched as `https://example.com/`.
|
|
11673
|
+
* When set, every pattern in `matches` must have a path of `/*`. Only applies to
|
|
11674
|
+
* `frame` contexts. Default is `false`.
|
|
11675
|
+
*/
|
|
11676
|
+
matchOriginAsFallback?: boolean;
|
|
11646
11677
|
/**
|
|
11647
11678
|
* Context type where the preload script will be executed. Possible values include
|
|
11648
11679
|
* `frame` or `service-worker`.
|
|
@@ -11654,6 +11685,14 @@ declare namespace Electron {
|
|
|
11654
11685
|
|
|
11655
11686
|
// Docs: https://electronjs.org/docs/api/structures/preload-script-registration
|
|
11656
11687
|
|
|
11688
|
+
/**
|
|
11689
|
+
* Glob patterns for URLs the script will not run in.
|
|
11690
|
+
*/
|
|
11691
|
+
excludeGlobs?: string[];
|
|
11692
|
+
/**
|
|
11693
|
+
* Match patterns for URLs the script will not run in.
|
|
11694
|
+
*/
|
|
11695
|
+
excludeMatches?: string[];
|
|
11657
11696
|
/**
|
|
11658
11697
|
* Path of the script file. Must be an absolute path.
|
|
11659
11698
|
*/
|
|
@@ -11662,6 +11701,30 @@ declare namespace Electron {
|
|
|
11662
11701
|
* Unique ID of preload script. Defaults to a random UUID.
|
|
11663
11702
|
*/
|
|
11664
11703
|
id?: string;
|
|
11704
|
+
/**
|
|
11705
|
+
* Glob patterns applied after `matches`. A URL must also match one of these globs.
|
|
11706
|
+
* `*` matches any sequence of characters and `?` matches zero or one character.
|
|
11707
|
+
* Must not be empty.
|
|
11708
|
+
*/
|
|
11709
|
+
includeGlobs?: string[];
|
|
11710
|
+
/**
|
|
11711
|
+
* Match patterns for URLs the script runs in. A custom protocol can be used if its
|
|
11712
|
+
* scheme is registered as `standard` with `protocol.registerSchemesAsPrivileged`.
|
|
11713
|
+
* To filter documents served from a non-standard scheme, use `includeGlobs` or
|
|
11714
|
+
* `excludeGlobs`, which match against the whole URL. If omitted, the script runs
|
|
11715
|
+
* for all URLs not excluded by other filters. Must not be empty.
|
|
11716
|
+
*/
|
|
11717
|
+
matches?: string[];
|
|
11718
|
+
/**
|
|
11719
|
+
* Whether a document whose URL has no origin of its own (`about:`, `blob:`,
|
|
11720
|
+
* `data:` or `filesystem:`) is matched by the origin of the frame that created it
|
|
11721
|
+
* instead of by its URL. This includes documents with an opaque origin, such as a
|
|
11722
|
+
* `data:` frame or a sandboxed `<iframe srcdoc>`. For example, an `about:blank`
|
|
11723
|
+
* popup opened by `https://example.com/page` is matched as `https://example.com/`.
|
|
11724
|
+
* When set, every pattern in `matches` must have a path of `/*`. Only applies to
|
|
11725
|
+
* `frame` contexts. Default is `false`.
|
|
11726
|
+
*/
|
|
11727
|
+
matchOriginAsFallback?: boolean;
|
|
11665
11728
|
/**
|
|
11666
11729
|
* Context type where the preload script will be executed. Possible values include
|
|
11667
11730
|
* `frame` or `service-worker`.
|
|
@@ -13826,7 +13889,33 @@ declare namespace Electron {
|
|
|
13826
13889
|
/**
|
|
13827
13890
|
* Registers preload script that will be executed in its associated context type in
|
|
13828
13891
|
* this session. For `frame` contexts, this will run prior to any preload defined
|
|
13829
|
-
* in the web preferences of a WebContents.
|
|
13892
|
+
* in the web preferences of a WebContents. In-page navigations do not rerun the
|
|
13893
|
+
* preload script.
|
|
13894
|
+
*
|
|
13895
|
+
* URL filters can limit which documents or service workers a script runs in. They
|
|
13896
|
+
* behave like content script URL matching. A script runs for a URL that meets all
|
|
13897
|
+
* of these conditions:
|
|
13898
|
+
*
|
|
13899
|
+
* * It matches at least one pattern in `matches`, if set.
|
|
13900
|
+
* * It matches at least one glob in `includeGlobs`, if set.
|
|
13901
|
+
* * It does not match any pattern in `excludeMatches`.
|
|
13902
|
+
* * It does not match any glob in `excludeGlobs`.
|
|
13903
|
+
*
|
|
13904
|
+
* The URL that the filters are matched against depends on the context type:
|
|
13905
|
+
*
|
|
13906
|
+
* * For `service-worker` contexts, it is the service worker's scope.
|
|
13907
|
+
* * For `frame` contexts, it is the URL of the document being loaded, with these
|
|
13908
|
+
* special cases:
|
|
13909
|
+
* * The initial empty document of a frame or popup is matched as `about:blank`.
|
|
13910
|
+
* Set `matchOriginAsFallback` to match such documents by the origin of the frame
|
|
13911
|
+
* that created them instead, for example to keep a script out of the `about:blank`
|
|
13912
|
+
* popups of an excluded site.
|
|
13913
|
+
* * A `data:` URL loaded with `baseURLForDataURL` is matched by its base URL.
|
|
13914
|
+
* * The error page of a failed navigation is matched by the URL that failed to
|
|
13915
|
+
* load.
|
|
13916
|
+
*
|
|
13917
|
+
* Throws an error if any of the URL patterns are invalid, or if `matches` or
|
|
13918
|
+
* `includeGlobs` is an empty array.
|
|
13830
13919
|
*
|
|
13831
13920
|
* The ID of the registered preload script.
|
|
13832
13921
|
*/
|
package/dist/version.json
CHANGED