electron 24.0.0-beta.7 → 25.0.0-alpha.1
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/checksums.json +75 -75
- package/electron.d.ts +883 -151
- package/package.json +1 -1
package/electron.d.ts
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
// Type definitions for Electron
|
|
1
|
+
// Type definitions for Electron 25.0.0-alpha.1
|
|
2
2
|
// Project: http://electronjs.org/
|
|
3
3
|
// Definitions by: The Electron Team <https://github.com/electron/electron>
|
|
4
|
-
// Definitions: https://github.com/electron/
|
|
4
|
+
// Definitions: https://github.com/electron/typescript-definitions
|
|
5
5
|
|
|
6
6
|
/// <reference types="node" />
|
|
7
7
|
|
|
8
|
-
type
|
|
8
|
+
type DOMEvent = Event;
|
|
9
|
+
type GlobalResponse = Response;
|
|
10
|
+
type GlobalRequest = Request;
|
|
9
11
|
|
|
10
12
|
declare namespace Electron {
|
|
11
13
|
const NodeEventEmitter: typeof import('events').EventEmitter;
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
type Accelerator = string;
|
|
16
|
+
type Event<Params extends object = {}> = {
|
|
17
|
+
preventDefault: () => void;
|
|
18
|
+
readonly defaultPrevented: boolean;
|
|
19
|
+
} & Params;
|
|
14
20
|
|
|
15
|
-
}
|
|
16
21
|
interface App extends NodeJS.EventEmitter {
|
|
17
22
|
|
|
18
23
|
// Docs: https://electronjs.org/docs/api/app
|
|
@@ -109,7 +114,7 @@ declare namespace Electron {
|
|
|
109
114
|
* the application.
|
|
110
115
|
*
|
|
111
116
|
* **Note:** If application quit was initiated by `autoUpdater.quitAndInstall()`,
|
|
112
|
-
* then `before-quit` is emitted
|
|
117
|
+
* then `before-quit` is emitted _after_ emitting `close` event on all windows and
|
|
113
118
|
* closing them.
|
|
114
119
|
*
|
|
115
120
|
* **Note:** On Windows, this event will not be emitted if the app is closed due to
|
|
@@ -446,12 +451,24 @@ declare namespace Electron {
|
|
|
446
451
|
* fulfilled when Electron is initialized.
|
|
447
452
|
*/
|
|
448
453
|
on(event: 'ready', listener: (event: Event,
|
|
454
|
+
/**
|
|
455
|
+
* @platform darwin
|
|
456
|
+
*/
|
|
449
457
|
launchInfo: (Record<string, any>) | (NotificationResponse)) => void): this;
|
|
450
458
|
once(event: 'ready', listener: (event: Event,
|
|
459
|
+
/**
|
|
460
|
+
* @platform darwin
|
|
461
|
+
*/
|
|
451
462
|
launchInfo: (Record<string, any>) | (NotificationResponse)) => void): this;
|
|
452
463
|
addListener(event: 'ready', listener: (event: Event,
|
|
464
|
+
/**
|
|
465
|
+
* @platform darwin
|
|
466
|
+
*/
|
|
453
467
|
launchInfo: (Record<string, any>) | (NotificationResponse)) => void): this;
|
|
454
468
|
removeListener(event: 'ready', listener: (event: Event,
|
|
469
|
+
/**
|
|
470
|
+
* @platform darwin
|
|
471
|
+
*/
|
|
455
472
|
launchInfo: (Record<string, any>) | (NotificationResponse)) => void): this;
|
|
456
473
|
/**
|
|
457
474
|
* Emitted when the renderer process unexpectedly disappears. This is normally
|
|
@@ -978,21 +995,14 @@ declare namespace Electron {
|
|
|
978
995
|
* Here are some examples of return values of the various language and locale APIs
|
|
979
996
|
* with different configurations:
|
|
980
997
|
*
|
|
981
|
-
*
|
|
982
|
-
*
|
|
983
|
-
*
|
|
984
|
-
*
|
|
985
|
-
*
|
|
986
|
-
*
|
|
987
|
-
*
|
|
988
|
-
* 'zh-Hans-CN', 'fi', 'es-419']`
|
|
989
|
-
* * On macOS, where the application locale is German, the region is Finland, and
|
|
990
|
-
* the preferred system languages from most to least preferred are French (Canada),
|
|
998
|
+
* On Windows, given application locale is German, the regional format is Finnish
|
|
999
|
+
* (Finland), and the preferred system languages from most to least preferred are
|
|
1000
|
+
* French (Canada), English (US), Simplified Chinese (China), Finnish, and Spanish
|
|
1001
|
+
* (Latin America):
|
|
1002
|
+
*
|
|
1003
|
+
* On macOS, given the application locale is German, the region is Finland, and the
|
|
1004
|
+
* preferred system languages from most to least preferred are French (Canada),
|
|
991
1005
|
* English (US), Simplified Chinese, and Spanish (Latin America):
|
|
992
|
-
* * `app.getLocale()` returns `'de'`
|
|
993
|
-
* * `app.getSystemLocale()` returns `'fr-FI'`
|
|
994
|
-
* * `app.getPreferredSystemLanguages()` returns `['fr-CA', 'en-US',
|
|
995
|
-
* 'zh-Hans-FI', 'es-419']`
|
|
996
1006
|
*
|
|
997
1007
|
* Both the available languages and regions and the possible return values differ
|
|
998
1008
|
* between the two operating systems.
|
|
@@ -1005,7 +1015,7 @@ declare namespace Electron {
|
|
|
1005
1015
|
* country code `FI` is used as the country code for preferred system languages
|
|
1006
1016
|
* that do not have associated countries in the language name.
|
|
1007
1017
|
*/
|
|
1008
|
-
getPreferredSystemLanguages():
|
|
1018
|
+
getPreferredSystemLanguages(): string[];
|
|
1009
1019
|
/**
|
|
1010
1020
|
* The current system locale. On Windows and Linux, it is fetched using Chromium's
|
|
1011
1021
|
* `i18n` library. On macOS, `[NSLocale currentLocale]` is used instead. To get the
|
|
@@ -1697,6 +1707,9 @@ declare namespace Electron {
|
|
|
1697
1707
|
* @experimental
|
|
1698
1708
|
*/
|
|
1699
1709
|
getBounds(): Rectangle;
|
|
1710
|
+
/**
|
|
1711
|
+
* @experimental
|
|
1712
|
+
*/
|
|
1700
1713
|
setAutoResize(options: AutoResizeOptions): void;
|
|
1701
1714
|
/**
|
|
1702
1715
|
* Examples of valid `color` values:
|
|
@@ -1883,7 +1896,7 @@ declare namespace Electron {
|
|
|
1883
1896
|
/**
|
|
1884
1897
|
* Emitted once when the window is moved to a new position.
|
|
1885
1898
|
*
|
|
1886
|
-
*
|
|
1899
|
+
* **Note**: On macOS this event is an alias of `move`.
|
|
1887
1900
|
*
|
|
1888
1901
|
* @platform darwin,win32
|
|
1889
1902
|
*/
|
|
@@ -2384,11 +2397,22 @@ declare namespace Electron {
|
|
|
2384
2397
|
*/
|
|
2385
2398
|
getTitle(): string;
|
|
2386
2399
|
/**
|
|
2387
|
-
* The custom position for the traffic light buttons in frameless window
|
|
2400
|
+
* The custom position for the traffic light buttons in frameless window, `{ x: 0,
|
|
2401
|
+
* y: 0 }` will be returned when there is no custom position.
|
|
2402
|
+
*
|
|
2403
|
+
* > **Note** This function is deprecated. Use getWindowButtonPosition instead.
|
|
2388
2404
|
*
|
|
2405
|
+
* @deprecated
|
|
2389
2406
|
* @platform darwin
|
|
2390
2407
|
*/
|
|
2391
2408
|
getTrafficLightPosition(): Point;
|
|
2409
|
+
/**
|
|
2410
|
+
* The custom position for the traffic light buttons in frameless window, `null`
|
|
2411
|
+
* will be returned when there is no custom position.
|
|
2412
|
+
*
|
|
2413
|
+
* @platform darwin
|
|
2414
|
+
*/
|
|
2415
|
+
getWindowButtonPosition(): (Point) | (null);
|
|
2392
2416
|
/**
|
|
2393
2417
|
* Whether the window has a shadow.
|
|
2394
2418
|
*/
|
|
@@ -2633,6 +2657,9 @@ declare namespace Electron {
|
|
|
2633
2657
|
* Same as `webContents.reload`.
|
|
2634
2658
|
*/
|
|
2635
2659
|
reload(): void;
|
|
2660
|
+
/**
|
|
2661
|
+
* @experimental
|
|
2662
|
+
*/
|
|
2636
2663
|
removeBrowserView(browserView: BrowserView): void;
|
|
2637
2664
|
/**
|
|
2638
2665
|
* Remove the window's menu bar.
|
|
@@ -2744,6 +2771,9 @@ declare namespace Electron {
|
|
|
2744
2771
|
* supplied will default to their current values.
|
|
2745
2772
|
*/
|
|
2746
2773
|
setBounds(bounds: Partial<Rectangle>, animate?: boolean): void;
|
|
2774
|
+
/**
|
|
2775
|
+
* @experimental
|
|
2776
|
+
*/
|
|
2747
2777
|
setBrowserView(browserView: (BrowserView) | (null)): void;
|
|
2748
2778
|
/**
|
|
2749
2779
|
* Sets whether the window can be manually closed by user. On Linux does nothing.
|
|
@@ -3039,8 +3069,12 @@ declare namespace Electron {
|
|
|
3039
3069
|
*/
|
|
3040
3070
|
setTouchBar(touchBar: (TouchBar) | (null)): void;
|
|
3041
3071
|
/**
|
|
3042
|
-
* Set a custom position for the traffic light buttons in frameless window.
|
|
3072
|
+
* Set a custom position for the traffic light buttons in frameless window. Passing
|
|
3073
|
+
* `{ x: 0, y: 0 }` will reset the position to default.
|
|
3074
|
+
*
|
|
3075
|
+
* > **Note** This function is deprecated. Use setWindowButtonPosition instead.
|
|
3043
3076
|
*
|
|
3077
|
+
* @deprecated
|
|
3044
3078
|
* @platform darwin
|
|
3045
3079
|
*/
|
|
3046
3080
|
setTrafficLightPosition(position: Point): void;
|
|
@@ -3062,6 +3096,13 @@ declare namespace Electron {
|
|
|
3062
3096
|
* @platform darwin,linux
|
|
3063
3097
|
*/
|
|
3064
3098
|
setVisibleOnAllWorkspaces(visible: boolean, options?: VisibleOnAllWorkspacesOptions): void;
|
|
3099
|
+
/**
|
|
3100
|
+
* Set a custom position for the traffic light buttons in frameless window. Passing
|
|
3101
|
+
* `null` will reset the position to default.
|
|
3102
|
+
*
|
|
3103
|
+
* @platform darwin
|
|
3104
|
+
*/
|
|
3105
|
+
setWindowButtonPosition(position: (Point) | (null)): void;
|
|
3065
3106
|
/**
|
|
3066
3107
|
* Sets whether the window traffic light buttons should be visible.
|
|
3067
3108
|
*
|
|
@@ -3458,7 +3499,7 @@ declare namespace Electron {
|
|
|
3458
3499
|
* Sends the last chunk of the request data. Subsequent write or end operations
|
|
3459
3500
|
* will not be allowed. The `finish` event is emitted just after the end operation.
|
|
3460
3501
|
*/
|
|
3461
|
-
end(chunk?: (string) | (Buffer), encoding?: string, callback?: () => void):
|
|
3502
|
+
end(chunk?: (string) | (Buffer), encoding?: string, callback?: () => void): this;
|
|
3462
3503
|
/**
|
|
3463
3504
|
* Continues any pending redirection. Can only be called during a `'redirect'`
|
|
3464
3505
|
* event.
|
|
@@ -4768,13 +4809,6 @@ declare namespace Electron {
|
|
|
4768
4809
|
savePath: string;
|
|
4769
4810
|
}
|
|
4770
4811
|
|
|
4771
|
-
interface Event extends GlobalEvent {
|
|
4772
|
-
|
|
4773
|
-
// Docs: https://electronjs.org/docs/api/structures/event
|
|
4774
|
-
|
|
4775
|
-
preventDefault: (() => void);
|
|
4776
|
-
}
|
|
4777
|
-
|
|
4778
4812
|
interface Extension {
|
|
4779
4813
|
|
|
4780
4814
|
// Docs: https://electronjs.org/docs/api/structures/extension
|
|
@@ -5254,7 +5288,7 @@ declare namespace Electron {
|
|
|
5254
5288
|
* "reply" to the sent message in order to guarantee the reply will go to the
|
|
5255
5289
|
* correct process and frame.
|
|
5256
5290
|
*/
|
|
5257
|
-
reply:
|
|
5291
|
+
reply: (channel: string, ...args: any[]) => void;
|
|
5258
5292
|
/**
|
|
5259
5293
|
* Set this to the value to be returned in a synchronous message
|
|
5260
5294
|
*/
|
|
@@ -5586,7 +5620,7 @@ declare namespace Electron {
|
|
|
5586
5620
|
size: number;
|
|
5587
5621
|
}
|
|
5588
5622
|
|
|
5589
|
-
class Menu {
|
|
5623
|
+
class Menu extends NodeEventEmitter {
|
|
5590
5624
|
|
|
5591
5625
|
// Docs: https://electronjs.org/docs/api/menu
|
|
5592
5626
|
|
|
@@ -5978,9 +6012,12 @@ declare namespace Electron {
|
|
|
5978
6012
|
/**
|
|
5979
6013
|
* fulfilled with the file's thumbnail preview image, which is a NativeImage.
|
|
5980
6014
|
*
|
|
6015
|
+
* Note: The Windows implementation will ignore `size.height` and scale the height
|
|
6016
|
+
* according to `size.width`.
|
|
6017
|
+
*
|
|
5981
6018
|
* @platform darwin,win32
|
|
5982
6019
|
*/
|
|
5983
|
-
static createThumbnailFromPath(path: string,
|
|
6020
|
+
static createThumbnailFromPath(path: string, size: Size): Promise<Electron.NativeImage>;
|
|
5984
6021
|
/**
|
|
5985
6022
|
* Add an image representation for a specific scale factor. This can be used to
|
|
5986
6023
|
* explicitly add different scale factor representations to an image. This can be
|
|
@@ -6160,6 +6197,34 @@ declare namespace Electron {
|
|
|
6160
6197
|
|
|
6161
6198
|
// Docs: https://electronjs.org/docs/api/net
|
|
6162
6199
|
|
|
6200
|
+
/**
|
|
6201
|
+
* see Response.
|
|
6202
|
+
*
|
|
6203
|
+
* Sends a request, similarly to how `fetch()` works in the renderer, using
|
|
6204
|
+
* Chrome's network stack. This differs from Node's `fetch()`, which uses Node.js's
|
|
6205
|
+
* HTTP stack.
|
|
6206
|
+
*
|
|
6207
|
+
* Example:
|
|
6208
|
+
*
|
|
6209
|
+
* This method will issue requests from the default session. To send a `fetch`
|
|
6210
|
+
* request from another session, use ses.fetch().
|
|
6211
|
+
*
|
|
6212
|
+
* See the MDN documentation for `fetch()` for more details.
|
|
6213
|
+
*
|
|
6214
|
+
* Limitations:
|
|
6215
|
+
*
|
|
6216
|
+
* * `net.fetch()` does not support the `data:` or `blob:` schemes.
|
|
6217
|
+
* * The value of the `integrity` option is ignored.
|
|
6218
|
+
* * The `.type` and `.url` values of the returned `Response` object are incorrect.
|
|
6219
|
+
*
|
|
6220
|
+
* By default, requests made with `net.fetch` can be made to custom protocols as
|
|
6221
|
+
* well as `file:`, and will trigger webRequest handlers if present. When the
|
|
6222
|
+
* non-standard `bypassCustomProtocolHandlers` option is set in RequestInit, custom
|
|
6223
|
+
* protocol handlers will not be called for this request. This allows forwarding an
|
|
6224
|
+
* intercepted request to the built-in handler. webRequest handlers will still be
|
|
6225
|
+
* triggered when bypassing custom protocols.
|
|
6226
|
+
*/
|
|
6227
|
+
fetch(input: (string) | (GlobalRequest), init?: RequestInit & { bypassCustomProtocolHandlers?: boolean }): Promise<GlobalResponse>;
|
|
6163
6228
|
/**
|
|
6164
6229
|
* Whether there is currently internet connection.
|
|
6165
6230
|
*
|
|
@@ -6217,6 +6282,9 @@ declare namespace Electron {
|
|
|
6217
6282
|
|
|
6218
6283
|
// Docs: https://electronjs.org/docs/api/notification
|
|
6219
6284
|
|
|
6285
|
+
/**
|
|
6286
|
+
* @platform darwin
|
|
6287
|
+
*/
|
|
6220
6288
|
on(event: 'action', listener: (event: Event,
|
|
6221
6289
|
/**
|
|
6222
6290
|
* The index of the action that was activated.
|
|
@@ -6885,11 +6953,24 @@ declare namespace Electron {
|
|
|
6885
6953
|
|
|
6886
6954
|
// Docs: https://electronjs.org/docs/api/protocol
|
|
6887
6955
|
|
|
6956
|
+
/**
|
|
6957
|
+
* Register a protocol handler for `scheme`. Requests made to URLs with this scheme
|
|
6958
|
+
* will delegate to this handler to determine what response should be sent.
|
|
6959
|
+
*
|
|
6960
|
+
* Either a `Response` or a `Promise<Response>` can be returned.
|
|
6961
|
+
*
|
|
6962
|
+
* Example:
|
|
6963
|
+
*
|
|
6964
|
+
* See the MDN docs for `Request` and `Response` for more details.
|
|
6965
|
+
*/
|
|
6966
|
+
handle(scheme: string, handler: (request: GlobalRequest) => (GlobalResponse) | (Promise<GlobalResponse>)): void;
|
|
6888
6967
|
/**
|
|
6889
6968
|
* Whether the protocol was successfully intercepted
|
|
6890
6969
|
*
|
|
6891
6970
|
* Intercepts `scheme` protocol and uses `handler` as the protocol's new handler
|
|
6892
6971
|
* which sends a `Buffer` as a response.
|
|
6972
|
+
*
|
|
6973
|
+
* @deprecated
|
|
6893
6974
|
*/
|
|
6894
6975
|
interceptBufferProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (Buffer) | (ProtocolResponse)) => void) => void): boolean;
|
|
6895
6976
|
/**
|
|
@@ -6897,6 +6978,8 @@ declare namespace Electron {
|
|
|
6897
6978
|
*
|
|
6898
6979
|
* Intercepts `scheme` protocol and uses `handler` as the protocol's new handler
|
|
6899
6980
|
* which sends a file as a response.
|
|
6981
|
+
*
|
|
6982
|
+
* @deprecated
|
|
6900
6983
|
*/
|
|
6901
6984
|
interceptFileProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (string) | (ProtocolResponse)) => void) => void): boolean;
|
|
6902
6985
|
/**
|
|
@@ -6904,6 +6987,8 @@ declare namespace Electron {
|
|
|
6904
6987
|
*
|
|
6905
6988
|
* Intercepts `scheme` protocol and uses `handler` as the protocol's new handler
|
|
6906
6989
|
* which sends a new HTTP request as a response.
|
|
6990
|
+
*
|
|
6991
|
+
* @deprecated
|
|
6907
6992
|
*/
|
|
6908
6993
|
interceptHttpProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: ProtocolResponse) => void) => void): boolean;
|
|
6909
6994
|
/**
|
|
@@ -6911,6 +6996,8 @@ declare namespace Electron {
|
|
|
6911
6996
|
*
|
|
6912
6997
|
* Same as `protocol.registerStreamProtocol`, except that it replaces an existing
|
|
6913
6998
|
* protocol handler.
|
|
6999
|
+
*
|
|
7000
|
+
* @deprecated
|
|
6914
7001
|
*/
|
|
6915
7002
|
interceptStreamProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (NodeJS.ReadableStream) | (ProtocolResponse)) => void) => void): boolean;
|
|
6916
7003
|
/**
|
|
@@ -6918,14 +7005,24 @@ declare namespace Electron {
|
|
|
6918
7005
|
*
|
|
6919
7006
|
* Intercepts `scheme` protocol and uses `handler` as the protocol's new handler
|
|
6920
7007
|
* which sends a `string` as a response.
|
|
7008
|
+
*
|
|
7009
|
+
* @deprecated
|
|
6921
7010
|
*/
|
|
6922
7011
|
interceptStringProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (string) | (ProtocolResponse)) => void) => void): boolean;
|
|
7012
|
+
/**
|
|
7013
|
+
* Whether `scheme` is already handled.
|
|
7014
|
+
*/
|
|
7015
|
+
isProtocolHandled(scheme: string): boolean;
|
|
6923
7016
|
/**
|
|
6924
7017
|
* Whether `scheme` is already intercepted.
|
|
7018
|
+
*
|
|
7019
|
+
* @deprecated
|
|
6925
7020
|
*/
|
|
6926
7021
|
isProtocolIntercepted(scheme: string): boolean;
|
|
6927
7022
|
/**
|
|
6928
7023
|
* Whether `scheme` is already registered.
|
|
7024
|
+
*
|
|
7025
|
+
* @deprecated
|
|
6929
7026
|
*/
|
|
6930
7027
|
isProtocolRegistered(scheme: string): boolean;
|
|
6931
7028
|
/**
|
|
@@ -6938,6 +7035,8 @@ declare namespace Electron {
|
|
|
6938
7035
|
* property.
|
|
6939
7036
|
*
|
|
6940
7037
|
* Example:
|
|
7038
|
+
*
|
|
7039
|
+
* @deprecated
|
|
6941
7040
|
*/
|
|
6942
7041
|
registerBufferProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (Buffer) | (ProtocolResponse)) => void) => void): boolean;
|
|
6943
7042
|
/**
|
|
@@ -6953,6 +7052,8 @@ declare namespace Electron {
|
|
|
6953
7052
|
*
|
|
6954
7053
|
* By default the `scheme` is treated like `http:`, which is parsed differently
|
|
6955
7054
|
* from protocols that follow the "generic URI syntax" like `file:`.
|
|
7055
|
+
*
|
|
7056
|
+
* @deprecated
|
|
6956
7057
|
*/
|
|
6957
7058
|
registerFileProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (string) | (ProtocolResponse)) => void) => void): boolean;
|
|
6958
7059
|
/**
|
|
@@ -6962,6 +7063,8 @@ declare namespace Electron {
|
|
|
6962
7063
|
*
|
|
6963
7064
|
* The usage is the same with `registerFileProtocol`, except that the `callback`
|
|
6964
7065
|
* should be called with an object that has the `url` property.
|
|
7066
|
+
*
|
|
7067
|
+
* @deprecated
|
|
6965
7068
|
*/
|
|
6966
7069
|
registerHttpProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: ProtocolResponse) => void) => void): boolean;
|
|
6967
7070
|
/**
|
|
@@ -7015,6 +7118,8 @@ declare namespace Electron {
|
|
|
7015
7118
|
*
|
|
7016
7119
|
* It is possible to pass any object that implements the readable stream API (emits
|
|
7017
7120
|
* `data`/`end`/`error` events). For example, here's how a file could be returned:
|
|
7121
|
+
*
|
|
7122
|
+
* @deprecated
|
|
7018
7123
|
*/
|
|
7019
7124
|
registerStreamProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (NodeJS.ReadableStream) | (ProtocolResponse)) => void) => void): boolean;
|
|
7020
7125
|
/**
|
|
@@ -7025,18 +7130,28 @@ declare namespace Electron {
|
|
|
7025
7130
|
* The usage is the same with `registerFileProtocol`, except that the `callback`
|
|
7026
7131
|
* should be called with either a `string` or an object that has the `data`
|
|
7027
7132
|
* property.
|
|
7133
|
+
*
|
|
7134
|
+
* @deprecated
|
|
7028
7135
|
*/
|
|
7029
7136
|
registerStringProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (string) | (ProtocolResponse)) => void) => void): boolean;
|
|
7137
|
+
/**
|
|
7138
|
+
* Removes a protocol handler registered with `protocol.handle`.
|
|
7139
|
+
*/
|
|
7140
|
+
unhandle(scheme: string): void;
|
|
7030
7141
|
/**
|
|
7031
7142
|
* Whether the protocol was successfully unintercepted
|
|
7032
7143
|
*
|
|
7033
7144
|
* Remove the interceptor installed for `scheme` and restore its original handler.
|
|
7145
|
+
*
|
|
7146
|
+
* @deprecated
|
|
7034
7147
|
*/
|
|
7035
7148
|
uninterceptProtocol(scheme: string): boolean;
|
|
7036
7149
|
/**
|
|
7037
7150
|
* Whether the protocol was successfully unregistered
|
|
7038
7151
|
*
|
|
7039
7152
|
* Unregisters the custom protocol of `scheme`.
|
|
7153
|
+
*
|
|
7154
|
+
* @deprecated
|
|
7040
7155
|
*/
|
|
7041
7156
|
unregisterProtocol(scheme: string): boolean;
|
|
7042
7157
|
}
|
|
@@ -7305,6 +7420,27 @@ declare namespace Electron {
|
|
|
7305
7420
|
url: string;
|
|
7306
7421
|
}
|
|
7307
7422
|
|
|
7423
|
+
interface ResolvedEndpoint {
|
|
7424
|
+
|
|
7425
|
+
// Docs: https://electronjs.org/docs/api/structures/resolved-endpoint
|
|
7426
|
+
|
|
7427
|
+
address: string;
|
|
7428
|
+
/**
|
|
7429
|
+
* One of the following:
|
|
7430
|
+
*/
|
|
7431
|
+
family: ('ipv4' | 'ipv6' | 'unspec');
|
|
7432
|
+
}
|
|
7433
|
+
|
|
7434
|
+
interface ResolvedHost {
|
|
7435
|
+
|
|
7436
|
+
// Docs: https://electronjs.org/docs/api/structures/resolved-host
|
|
7437
|
+
|
|
7438
|
+
/**
|
|
7439
|
+
* resolved DNS entries for the hostname
|
|
7440
|
+
*/
|
|
7441
|
+
endpoints: ResolvedEndpoint[];
|
|
7442
|
+
}
|
|
7443
|
+
|
|
7308
7444
|
interface SafeStorage extends NodeJS.EventEmitter {
|
|
7309
7445
|
|
|
7310
7446
|
// Docs: https://electronjs.org/docs/api/safe-storage
|
|
@@ -7604,6 +7740,18 @@ declare namespace Electron {
|
|
|
7604
7740
|
* of an existing `Session` object.
|
|
7605
7741
|
*/
|
|
7606
7742
|
static fromPartition(partition: string, options?: FromPartitionOptions): Session;
|
|
7743
|
+
/**
|
|
7744
|
+
* A session instance from the absolute path as specified by the `path` string.
|
|
7745
|
+
* When there is an existing `Session` with the same absolute path, it will be
|
|
7746
|
+
* returned; otherwise a new `Session` instance will be created with `options`. The
|
|
7747
|
+
* call will throw an error if the path is not an absolute path. Additionally, an
|
|
7748
|
+
* error will be thrown if an empty string is provided.
|
|
7749
|
+
*
|
|
7750
|
+
* To create a `Session` with `options`, you have to ensure the `Session` with the
|
|
7751
|
+
* `path` has never been used before. There is no way to change the `options` of an
|
|
7752
|
+
* existing `Session` object.
|
|
7753
|
+
*/
|
|
7754
|
+
static fromPath(path: string, options?: FromPathOptions): Session;
|
|
7607
7755
|
/**
|
|
7608
7756
|
* A `Session` object, the default session object of the app.
|
|
7609
7757
|
*/
|
|
@@ -8073,6 +8221,34 @@ declare namespace Electron {
|
|
|
8073
8221
|
* Emulates network with the given configuration for the `session`.
|
|
8074
8222
|
*/
|
|
8075
8223
|
enableNetworkEmulation(options: EnableNetworkEmulationOptions): void;
|
|
8224
|
+
/**
|
|
8225
|
+
* see Response.
|
|
8226
|
+
*
|
|
8227
|
+
* Sends a request, similarly to how `fetch()` works in the renderer, using
|
|
8228
|
+
* Chrome's network stack. This differs from Node's `fetch()`, which uses Node.js's
|
|
8229
|
+
* HTTP stack.
|
|
8230
|
+
*
|
|
8231
|
+
* Example:
|
|
8232
|
+
*
|
|
8233
|
+
* See also `net.fetch()`, a convenience method which issues requests from the
|
|
8234
|
+
* default session.
|
|
8235
|
+
*
|
|
8236
|
+
* See the MDN documentation for `fetch()` for more details.
|
|
8237
|
+
*
|
|
8238
|
+
* Limitations:
|
|
8239
|
+
*
|
|
8240
|
+
* * `net.fetch()` does not support the `data:` or `blob:` schemes.
|
|
8241
|
+
* * The value of the `integrity` option is ignored.
|
|
8242
|
+
* * The `.type` and `.url` values of the returned `Response` object are incorrect.
|
|
8243
|
+
*
|
|
8244
|
+
* By default, requests made with `net.fetch` can be made to custom protocols as
|
|
8245
|
+
* well as `file:`, and will trigger webRequest handlers if present. When the
|
|
8246
|
+
* non-standard `bypassCustomProtocolHandlers` option is set in RequestInit, custom
|
|
8247
|
+
* protocol handlers will not be called for this request. This allows forwarding an
|
|
8248
|
+
* intercepted request to the built-in handler. webRequest handlers will still be
|
|
8249
|
+
* triggered when bypassing custom protocols.
|
|
8250
|
+
*/
|
|
8251
|
+
fetch(input: (string) | (GlobalRequest), init?: RequestInit): Promise<GlobalResponse>;
|
|
8076
8252
|
/**
|
|
8077
8253
|
* Writes any unwritten DOMStorage data to disk.
|
|
8078
8254
|
*/
|
|
@@ -8188,6 +8364,10 @@ declare namespace Electron {
|
|
|
8188
8364
|
* dictionary as well
|
|
8189
8365
|
*/
|
|
8190
8366
|
removeWordFromSpellCheckerDictionary(word: string): boolean;
|
|
8367
|
+
/**
|
|
8368
|
+
* Resolves with the resolved IP addresses for the `host`.
|
|
8369
|
+
*/
|
|
8370
|
+
resolveHost(host: string, options?: ResolveHostOptions): Promise<Electron.ResolvedHost>;
|
|
8191
8371
|
/**
|
|
8192
8372
|
* Resolves with the proxy information for `url`.
|
|
8193
8373
|
*/
|
|
@@ -8596,6 +8776,9 @@ declare namespace Electron {
|
|
|
8596
8776
|
|
|
8597
8777
|
// Docs: https://electronjs.org/docs/api/system-preferences
|
|
8598
8778
|
|
|
8779
|
+
/**
|
|
8780
|
+
* @platform win32
|
|
8781
|
+
*/
|
|
8599
8782
|
on(event: 'accent-color-changed', listener: (event: Event,
|
|
8600
8783
|
/**
|
|
8601
8784
|
* The new RGBA color the user assigned to be their system accent color.
|
|
@@ -8616,6 +8799,9 @@ declare namespace Electron {
|
|
|
8616
8799
|
* The new RGBA color the user assigned to be their system accent color.
|
|
8617
8800
|
*/
|
|
8618
8801
|
newColor: string) => void): this;
|
|
8802
|
+
/**
|
|
8803
|
+
* @platform win32
|
|
8804
|
+
*/
|
|
8619
8805
|
on(event: 'color-changed', listener: (event: Event) => void): this;
|
|
8620
8806
|
once(event: 'color-changed', listener: (event: Event) => void): this;
|
|
8621
8807
|
addListener(event: 'color-changed', listener: (event: Event) => void): this;
|
|
@@ -9057,7 +9243,7 @@ declare namespace Electron {
|
|
|
9057
9243
|
|
|
9058
9244
|
// Docs: https://electronjs.org/docs/api/structures/thumbar-button
|
|
9059
9245
|
|
|
9060
|
-
click:
|
|
9246
|
+
click: () => void;
|
|
9061
9247
|
/**
|
|
9062
9248
|
* Control specific states and behaviors of the button. By default, it is
|
|
9063
9249
|
* `['enabled']`.
|
|
@@ -9967,15 +10153,16 @@ declare namespace Electron {
|
|
|
9967
10153
|
/**
|
|
9968
10154
|
* Number of bytes to read from `offset`. Defaults to `0`.
|
|
9969
10155
|
*/
|
|
9970
|
-
length
|
|
10156
|
+
length?: number;
|
|
9971
10157
|
/**
|
|
9972
|
-
* Last Modification time in number of seconds since the UNIX epoch.
|
|
10158
|
+
* Last Modification time in number of seconds since the UNIX epoch. Defaults to
|
|
10159
|
+
* `0`.
|
|
9973
10160
|
*/
|
|
9974
|
-
modificationTime
|
|
10161
|
+
modificationTime?: number;
|
|
9975
10162
|
/**
|
|
9976
10163
|
* Defaults to `0`.
|
|
9977
10164
|
*/
|
|
9978
|
-
offset
|
|
10165
|
+
offset?: number;
|
|
9979
10166
|
/**
|
|
9980
10167
|
* `file`.
|
|
9981
10168
|
*/
|
|
@@ -10191,6 +10378,13 @@ declare namespace Electron {
|
|
|
10191
10378
|
* `null`.
|
|
10192
10379
|
*/
|
|
10193
10380
|
static getFocusedWebContents(): WebContents;
|
|
10381
|
+
/**
|
|
10382
|
+
* Emitted when media becomes audible or inaudible.
|
|
10383
|
+
*/
|
|
10384
|
+
on(event: 'audio-state-changed', listener: (event: Event<WebContentsAudioStateChangedEventParams>) => void): this;
|
|
10385
|
+
once(event: 'audio-state-changed', listener: (event: Event<WebContentsAudioStateChangedEventParams>) => void): this;
|
|
10386
|
+
addListener(event: 'audio-state-changed', listener: (event: Event<WebContentsAudioStateChangedEventParams>) => void): this;
|
|
10387
|
+
removeListener(event: 'audio-state-changed', listener: (event: Event<WebContentsAudioStateChangedEventParams>) => void): this;
|
|
10194
10388
|
/**
|
|
10195
10389
|
* Emitted before dispatching the `keydown` and `keyup` events in the page. Calling
|
|
10196
10390
|
* `event.preventDefault` will prevent the page `keydown`/`keyup` events and the
|
|
@@ -10811,29 +11005,89 @@ declare namespace Electron {
|
|
|
10811
11005
|
* This event cannot be prevented, if you want to prevent redirects you should
|
|
10812
11006
|
* checkout out the `will-redirect` event above.
|
|
10813
11007
|
*/
|
|
10814
|
-
on(event: 'did-redirect-navigation', listener: (
|
|
11008
|
+
on(event: 'did-redirect-navigation', listener: (details: Event<WebContentsDidRedirectNavigationEventParams>,
|
|
11009
|
+
/**
|
|
11010
|
+
* @deprecated
|
|
11011
|
+
*/
|
|
10815
11012
|
url: string,
|
|
11013
|
+
/**
|
|
11014
|
+
* @deprecated
|
|
11015
|
+
*/
|
|
10816
11016
|
isInPlace: boolean,
|
|
11017
|
+
/**
|
|
11018
|
+
* @deprecated
|
|
11019
|
+
*/
|
|
10817
11020
|
isMainFrame: boolean,
|
|
11021
|
+
/**
|
|
11022
|
+
* @deprecated
|
|
11023
|
+
*/
|
|
10818
11024
|
frameProcessId: number,
|
|
11025
|
+
/**
|
|
11026
|
+
* @deprecated
|
|
11027
|
+
*/
|
|
10819
11028
|
frameRoutingId: number) => void): this;
|
|
10820
|
-
once(event: 'did-redirect-navigation', listener: (
|
|
11029
|
+
once(event: 'did-redirect-navigation', listener: (details: Event<WebContentsDidRedirectNavigationEventParams>,
|
|
11030
|
+
/**
|
|
11031
|
+
* @deprecated
|
|
11032
|
+
*/
|
|
10821
11033
|
url: string,
|
|
11034
|
+
/**
|
|
11035
|
+
* @deprecated
|
|
11036
|
+
*/
|
|
10822
11037
|
isInPlace: boolean,
|
|
11038
|
+
/**
|
|
11039
|
+
* @deprecated
|
|
11040
|
+
*/
|
|
10823
11041
|
isMainFrame: boolean,
|
|
11042
|
+
/**
|
|
11043
|
+
* @deprecated
|
|
11044
|
+
*/
|
|
10824
11045
|
frameProcessId: number,
|
|
11046
|
+
/**
|
|
11047
|
+
* @deprecated
|
|
11048
|
+
*/
|
|
10825
11049
|
frameRoutingId: number) => void): this;
|
|
10826
|
-
addListener(event: 'did-redirect-navigation', listener: (
|
|
11050
|
+
addListener(event: 'did-redirect-navigation', listener: (details: Event<WebContentsDidRedirectNavigationEventParams>,
|
|
11051
|
+
/**
|
|
11052
|
+
* @deprecated
|
|
11053
|
+
*/
|
|
10827
11054
|
url: string,
|
|
11055
|
+
/**
|
|
11056
|
+
* @deprecated
|
|
11057
|
+
*/
|
|
10828
11058
|
isInPlace: boolean,
|
|
11059
|
+
/**
|
|
11060
|
+
* @deprecated
|
|
11061
|
+
*/
|
|
10829
11062
|
isMainFrame: boolean,
|
|
11063
|
+
/**
|
|
11064
|
+
* @deprecated
|
|
11065
|
+
*/
|
|
10830
11066
|
frameProcessId: number,
|
|
11067
|
+
/**
|
|
11068
|
+
* @deprecated
|
|
11069
|
+
*/
|
|
10831
11070
|
frameRoutingId: number) => void): this;
|
|
10832
|
-
removeListener(event: 'did-redirect-navigation', listener: (
|
|
11071
|
+
removeListener(event: 'did-redirect-navigation', listener: (details: Event<WebContentsDidRedirectNavigationEventParams>,
|
|
11072
|
+
/**
|
|
11073
|
+
* @deprecated
|
|
11074
|
+
*/
|
|
10833
11075
|
url: string,
|
|
11076
|
+
/**
|
|
11077
|
+
* @deprecated
|
|
11078
|
+
*/
|
|
10834
11079
|
isInPlace: boolean,
|
|
11080
|
+
/**
|
|
11081
|
+
* @deprecated
|
|
11082
|
+
*/
|
|
10835
11083
|
isMainFrame: boolean,
|
|
11084
|
+
/**
|
|
11085
|
+
* @deprecated
|
|
11086
|
+
*/
|
|
10836
11087
|
frameProcessId: number,
|
|
11088
|
+
/**
|
|
11089
|
+
* @deprecated
|
|
11090
|
+
*/
|
|
10837
11091
|
frameRoutingId: number) => void): this;
|
|
10838
11092
|
/**
|
|
10839
11093
|
* Corresponds to the points in time when the spinner of the tab started spinning.
|
|
@@ -10843,32 +11097,91 @@ declare namespace Electron {
|
|
|
10843
11097
|
addListener(event: 'did-start-loading', listener: Function): this;
|
|
10844
11098
|
removeListener(event: 'did-start-loading', listener: Function): this;
|
|
10845
11099
|
/**
|
|
10846
|
-
* Emitted when any frame (including main) starts navigating.
|
|
10847
|
-
* `true` for in-page navigations.
|
|
11100
|
+
* Emitted when any frame (including main) starts navigating.
|
|
10848
11101
|
*/
|
|
10849
|
-
on(event: 'did-start-navigation', listener: (
|
|
11102
|
+
on(event: 'did-start-navigation', listener: (details: Event<WebContentsDidStartNavigationEventParams>,
|
|
11103
|
+
/**
|
|
11104
|
+
* @deprecated
|
|
11105
|
+
*/
|
|
10850
11106
|
url: string,
|
|
11107
|
+
/**
|
|
11108
|
+
* @deprecated
|
|
11109
|
+
*/
|
|
10851
11110
|
isInPlace: boolean,
|
|
11111
|
+
/**
|
|
11112
|
+
* @deprecated
|
|
11113
|
+
*/
|
|
10852
11114
|
isMainFrame: boolean,
|
|
11115
|
+
/**
|
|
11116
|
+
* @deprecated
|
|
11117
|
+
*/
|
|
10853
11118
|
frameProcessId: number,
|
|
11119
|
+
/**
|
|
11120
|
+
* @deprecated
|
|
11121
|
+
*/
|
|
10854
11122
|
frameRoutingId: number) => void): this;
|
|
10855
|
-
once(event: 'did-start-navigation', listener: (
|
|
11123
|
+
once(event: 'did-start-navigation', listener: (details: Event<WebContentsDidStartNavigationEventParams>,
|
|
11124
|
+
/**
|
|
11125
|
+
* @deprecated
|
|
11126
|
+
*/
|
|
10856
11127
|
url: string,
|
|
11128
|
+
/**
|
|
11129
|
+
* @deprecated
|
|
11130
|
+
*/
|
|
10857
11131
|
isInPlace: boolean,
|
|
11132
|
+
/**
|
|
11133
|
+
* @deprecated
|
|
11134
|
+
*/
|
|
10858
11135
|
isMainFrame: boolean,
|
|
11136
|
+
/**
|
|
11137
|
+
* @deprecated
|
|
11138
|
+
*/
|
|
10859
11139
|
frameProcessId: number,
|
|
11140
|
+
/**
|
|
11141
|
+
* @deprecated
|
|
11142
|
+
*/
|
|
10860
11143
|
frameRoutingId: number) => void): this;
|
|
10861
|
-
addListener(event: 'did-start-navigation', listener: (
|
|
11144
|
+
addListener(event: 'did-start-navigation', listener: (details: Event<WebContentsDidStartNavigationEventParams>,
|
|
11145
|
+
/**
|
|
11146
|
+
* @deprecated
|
|
11147
|
+
*/
|
|
10862
11148
|
url: string,
|
|
11149
|
+
/**
|
|
11150
|
+
* @deprecated
|
|
11151
|
+
*/
|
|
10863
11152
|
isInPlace: boolean,
|
|
11153
|
+
/**
|
|
11154
|
+
* @deprecated
|
|
11155
|
+
*/
|
|
10864
11156
|
isMainFrame: boolean,
|
|
11157
|
+
/**
|
|
11158
|
+
* @deprecated
|
|
11159
|
+
*/
|
|
10865
11160
|
frameProcessId: number,
|
|
11161
|
+
/**
|
|
11162
|
+
* @deprecated
|
|
11163
|
+
*/
|
|
10866
11164
|
frameRoutingId: number) => void): this;
|
|
10867
|
-
removeListener(event: 'did-start-navigation', listener: (
|
|
11165
|
+
removeListener(event: 'did-start-navigation', listener: (details: Event<WebContentsDidStartNavigationEventParams>,
|
|
11166
|
+
/**
|
|
11167
|
+
* @deprecated
|
|
11168
|
+
*/
|
|
10868
11169
|
url: string,
|
|
11170
|
+
/**
|
|
11171
|
+
* @deprecated
|
|
11172
|
+
*/
|
|
10869
11173
|
isInPlace: boolean,
|
|
11174
|
+
/**
|
|
11175
|
+
* @deprecated
|
|
11176
|
+
*/
|
|
10870
11177
|
isMainFrame: boolean,
|
|
11178
|
+
/**
|
|
11179
|
+
* @deprecated
|
|
11180
|
+
*/
|
|
10871
11181
|
frameProcessId: number,
|
|
11182
|
+
/**
|
|
11183
|
+
* @deprecated
|
|
11184
|
+
*/
|
|
10872
11185
|
frameRoutingId: number) => void): this;
|
|
10873
11186
|
/**
|
|
10874
11187
|
* Corresponds to the points in time when the spinner of the tab stopped spinning.
|
|
@@ -10949,16 +11262,16 @@ declare namespace Electron {
|
|
|
10949
11262
|
* See also `webContents.ipc`, which provides an `IpcMain`-like interface for
|
|
10950
11263
|
* responding to IPC messages specifically from this WebContents.
|
|
10951
11264
|
*/
|
|
10952
|
-
on(event: 'ipc-message', listener: (event:
|
|
11265
|
+
on(event: 'ipc-message', listener: (event: IpcMainEvent,
|
|
10953
11266
|
channel: string,
|
|
10954
11267
|
...args: any[]) => void): this;
|
|
10955
|
-
once(event: 'ipc-message', listener: (event:
|
|
11268
|
+
once(event: 'ipc-message', listener: (event: IpcMainEvent,
|
|
10956
11269
|
channel: string,
|
|
10957
11270
|
...args: any[]) => void): this;
|
|
10958
|
-
addListener(event: 'ipc-message', listener: (event:
|
|
11271
|
+
addListener(event: 'ipc-message', listener: (event: IpcMainEvent,
|
|
10959
11272
|
channel: string,
|
|
10960
11273
|
...args: any[]) => void): this;
|
|
10961
|
-
removeListener(event: 'ipc-message', listener: (event:
|
|
11274
|
+
removeListener(event: 'ipc-message', listener: (event: IpcMainEvent,
|
|
10962
11275
|
channel: string,
|
|
10963
11276
|
...args: any[]) => void): this;
|
|
10964
11277
|
/**
|
|
@@ -10968,16 +11281,16 @@ declare namespace Electron {
|
|
|
10968
11281
|
* See also `webContents.ipc`, which provides an `IpcMain`-like interface for
|
|
10969
11282
|
* responding to IPC messages specifically from this WebContents.
|
|
10970
11283
|
*/
|
|
10971
|
-
on(event: 'ipc-message-sync', listener: (event:
|
|
11284
|
+
on(event: 'ipc-message-sync', listener: (event: IpcMainEvent,
|
|
10972
11285
|
channel: string,
|
|
10973
11286
|
...args: any[]) => void): this;
|
|
10974
|
-
once(event: 'ipc-message-sync', listener: (event:
|
|
11287
|
+
once(event: 'ipc-message-sync', listener: (event: IpcMainEvent,
|
|
10975
11288
|
channel: string,
|
|
10976
11289
|
...args: any[]) => void): this;
|
|
10977
|
-
addListener(event: 'ipc-message-sync', listener: (event:
|
|
11290
|
+
addListener(event: 'ipc-message-sync', listener: (event: IpcMainEvent,
|
|
10978
11291
|
channel: string,
|
|
10979
11292
|
...args: any[]) => void): this;
|
|
10980
|
-
removeListener(event: 'ipc-message-sync', listener: (event:
|
|
11293
|
+
removeListener(event: 'ipc-message-sync', listener: (event: IpcMainEvent,
|
|
10981
11294
|
channel: string,
|
|
10982
11295
|
...args: any[]) => void): this;
|
|
10983
11296
|
/**
|
|
@@ -11288,8 +11601,31 @@ declare namespace Electron {
|
|
|
11288
11601
|
*/
|
|
11289
11602
|
params: Record<string, string>) => void): this;
|
|
11290
11603
|
/**
|
|
11291
|
-
* Emitted when a user or the page wants to start navigation. It can
|
|
11292
|
-
* the `window.location` object is changed or a user clicks a link in
|
|
11604
|
+
* Emitted when a user or the page wants to start navigation in any frame. It can
|
|
11605
|
+
* happen when the `window.location` object is changed or a user clicks a link in
|
|
11606
|
+
* the page.
|
|
11607
|
+
*
|
|
11608
|
+
* Unlike `will-navigate`, `will-frame-navigate` is fired when the main frame or
|
|
11609
|
+
* any of its subframes attempts to navigate. When the navigation event comes from
|
|
11610
|
+
* the main frame, `isMainFrame` will be `true`.
|
|
11611
|
+
*
|
|
11612
|
+
* This event will not emit when the navigation is started programmatically with
|
|
11613
|
+
* APIs like `webContents.loadURL` and `webContents.back`.
|
|
11614
|
+
*
|
|
11615
|
+
* It is also not emitted for in-page navigations, such as clicking anchor links or
|
|
11616
|
+
* updating the `window.location.hash`. Use `did-navigate-in-page` event for this
|
|
11617
|
+
* purpose.
|
|
11618
|
+
*
|
|
11619
|
+
* Calling `event.preventDefault()` will prevent the navigation.
|
|
11620
|
+
*/
|
|
11621
|
+
on(event: 'will-frame-navigate', listener: (details: Event<WebContentsWillFrameNavigateEventParams>) => void): this;
|
|
11622
|
+
once(event: 'will-frame-navigate', listener: (details: Event<WebContentsWillFrameNavigateEventParams>) => void): this;
|
|
11623
|
+
addListener(event: 'will-frame-navigate', listener: (details: Event<WebContentsWillFrameNavigateEventParams>) => void): this;
|
|
11624
|
+
removeListener(event: 'will-frame-navigate', listener: (details: Event<WebContentsWillFrameNavigateEventParams>) => void): this;
|
|
11625
|
+
/**
|
|
11626
|
+
* Emitted when a user or the page wants to start navigation on the main frame. It
|
|
11627
|
+
* can happen when the `window.location` object is changed or a user clicks a link
|
|
11628
|
+
* in the page.
|
|
11293
11629
|
*
|
|
11294
11630
|
* This event will not emit when the navigation is started programmatically with
|
|
11295
11631
|
* APIs like `webContents.loadURL` and `webContents.back`.
|
|
@@ -11300,14 +11636,90 @@ declare namespace Electron {
|
|
|
11300
11636
|
*
|
|
11301
11637
|
* Calling `event.preventDefault()` will prevent the navigation.
|
|
11302
11638
|
*/
|
|
11303
|
-
on(event: 'will-navigate', listener: (
|
|
11304
|
-
|
|
11305
|
-
|
|
11306
|
-
|
|
11307
|
-
|
|
11308
|
-
|
|
11309
|
-
|
|
11310
|
-
|
|
11639
|
+
on(event: 'will-navigate', listener: (details: Event<WebContentsWillNavigateEventParams>,
|
|
11640
|
+
/**
|
|
11641
|
+
* @deprecated
|
|
11642
|
+
*/
|
|
11643
|
+
url: string,
|
|
11644
|
+
/**
|
|
11645
|
+
* @deprecated
|
|
11646
|
+
*/
|
|
11647
|
+
isInPlace: boolean,
|
|
11648
|
+
/**
|
|
11649
|
+
* @deprecated
|
|
11650
|
+
*/
|
|
11651
|
+
isMainFrame: boolean,
|
|
11652
|
+
/**
|
|
11653
|
+
* @deprecated
|
|
11654
|
+
*/
|
|
11655
|
+
frameProcessId: number,
|
|
11656
|
+
/**
|
|
11657
|
+
* @deprecated
|
|
11658
|
+
*/
|
|
11659
|
+
frameRoutingId: number) => void): this;
|
|
11660
|
+
once(event: 'will-navigate', listener: (details: Event<WebContentsWillNavigateEventParams>,
|
|
11661
|
+
/**
|
|
11662
|
+
* @deprecated
|
|
11663
|
+
*/
|
|
11664
|
+
url: string,
|
|
11665
|
+
/**
|
|
11666
|
+
* @deprecated
|
|
11667
|
+
*/
|
|
11668
|
+
isInPlace: boolean,
|
|
11669
|
+
/**
|
|
11670
|
+
* @deprecated
|
|
11671
|
+
*/
|
|
11672
|
+
isMainFrame: boolean,
|
|
11673
|
+
/**
|
|
11674
|
+
* @deprecated
|
|
11675
|
+
*/
|
|
11676
|
+
frameProcessId: number,
|
|
11677
|
+
/**
|
|
11678
|
+
* @deprecated
|
|
11679
|
+
*/
|
|
11680
|
+
frameRoutingId: number) => void): this;
|
|
11681
|
+
addListener(event: 'will-navigate', listener: (details: Event<WebContentsWillNavigateEventParams>,
|
|
11682
|
+
/**
|
|
11683
|
+
* @deprecated
|
|
11684
|
+
*/
|
|
11685
|
+
url: string,
|
|
11686
|
+
/**
|
|
11687
|
+
* @deprecated
|
|
11688
|
+
*/
|
|
11689
|
+
isInPlace: boolean,
|
|
11690
|
+
/**
|
|
11691
|
+
* @deprecated
|
|
11692
|
+
*/
|
|
11693
|
+
isMainFrame: boolean,
|
|
11694
|
+
/**
|
|
11695
|
+
* @deprecated
|
|
11696
|
+
*/
|
|
11697
|
+
frameProcessId: number,
|
|
11698
|
+
/**
|
|
11699
|
+
* @deprecated
|
|
11700
|
+
*/
|
|
11701
|
+
frameRoutingId: number) => void): this;
|
|
11702
|
+
removeListener(event: 'will-navigate', listener: (details: Event<WebContentsWillNavigateEventParams>,
|
|
11703
|
+
/**
|
|
11704
|
+
* @deprecated
|
|
11705
|
+
*/
|
|
11706
|
+
url: string,
|
|
11707
|
+
/**
|
|
11708
|
+
* @deprecated
|
|
11709
|
+
*/
|
|
11710
|
+
isInPlace: boolean,
|
|
11711
|
+
/**
|
|
11712
|
+
* @deprecated
|
|
11713
|
+
*/
|
|
11714
|
+
isMainFrame: boolean,
|
|
11715
|
+
/**
|
|
11716
|
+
* @deprecated
|
|
11717
|
+
*/
|
|
11718
|
+
frameProcessId: number,
|
|
11719
|
+
/**
|
|
11720
|
+
* @deprecated
|
|
11721
|
+
*/
|
|
11722
|
+
frameRoutingId: number) => void): this;
|
|
11311
11723
|
/**
|
|
11312
11724
|
* Emitted when a `beforeunload` event handler is attempting to cancel a page
|
|
11313
11725
|
* unload.
|
|
@@ -11333,29 +11745,89 @@ declare namespace Electron {
|
|
|
11333
11745
|
* Calling `event.preventDefault()` will prevent the navigation (not just the
|
|
11334
11746
|
* redirect).
|
|
11335
11747
|
*/
|
|
11336
|
-
on(event: 'will-redirect', listener: (
|
|
11748
|
+
on(event: 'will-redirect', listener: (details: Event<WebContentsWillRedirectEventParams>,
|
|
11749
|
+
/**
|
|
11750
|
+
* @deprecated
|
|
11751
|
+
*/
|
|
11337
11752
|
url: string,
|
|
11753
|
+
/**
|
|
11754
|
+
* @deprecated
|
|
11755
|
+
*/
|
|
11338
11756
|
isInPlace: boolean,
|
|
11757
|
+
/**
|
|
11758
|
+
* @deprecated
|
|
11759
|
+
*/
|
|
11339
11760
|
isMainFrame: boolean,
|
|
11761
|
+
/**
|
|
11762
|
+
* @deprecated
|
|
11763
|
+
*/
|
|
11340
11764
|
frameProcessId: number,
|
|
11765
|
+
/**
|
|
11766
|
+
* @deprecated
|
|
11767
|
+
*/
|
|
11341
11768
|
frameRoutingId: number) => void): this;
|
|
11342
|
-
once(event: 'will-redirect', listener: (
|
|
11769
|
+
once(event: 'will-redirect', listener: (details: Event<WebContentsWillRedirectEventParams>,
|
|
11770
|
+
/**
|
|
11771
|
+
* @deprecated
|
|
11772
|
+
*/
|
|
11343
11773
|
url: string,
|
|
11774
|
+
/**
|
|
11775
|
+
* @deprecated
|
|
11776
|
+
*/
|
|
11344
11777
|
isInPlace: boolean,
|
|
11778
|
+
/**
|
|
11779
|
+
* @deprecated
|
|
11780
|
+
*/
|
|
11345
11781
|
isMainFrame: boolean,
|
|
11782
|
+
/**
|
|
11783
|
+
* @deprecated
|
|
11784
|
+
*/
|
|
11346
11785
|
frameProcessId: number,
|
|
11786
|
+
/**
|
|
11787
|
+
* @deprecated
|
|
11788
|
+
*/
|
|
11347
11789
|
frameRoutingId: number) => void): this;
|
|
11348
|
-
addListener(event: 'will-redirect', listener: (
|
|
11790
|
+
addListener(event: 'will-redirect', listener: (details: Event<WebContentsWillRedirectEventParams>,
|
|
11791
|
+
/**
|
|
11792
|
+
* @deprecated
|
|
11793
|
+
*/
|
|
11349
11794
|
url: string,
|
|
11795
|
+
/**
|
|
11796
|
+
* @deprecated
|
|
11797
|
+
*/
|
|
11350
11798
|
isInPlace: boolean,
|
|
11799
|
+
/**
|
|
11800
|
+
* @deprecated
|
|
11801
|
+
*/
|
|
11351
11802
|
isMainFrame: boolean,
|
|
11803
|
+
/**
|
|
11804
|
+
* @deprecated
|
|
11805
|
+
*/
|
|
11352
11806
|
frameProcessId: number,
|
|
11807
|
+
/**
|
|
11808
|
+
* @deprecated
|
|
11809
|
+
*/
|
|
11353
11810
|
frameRoutingId: number) => void): this;
|
|
11354
|
-
removeListener(event: 'will-redirect', listener: (
|
|
11811
|
+
removeListener(event: 'will-redirect', listener: (details: Event<WebContentsWillRedirectEventParams>,
|
|
11812
|
+
/**
|
|
11813
|
+
* @deprecated
|
|
11814
|
+
*/
|
|
11355
11815
|
url: string,
|
|
11816
|
+
/**
|
|
11817
|
+
* @deprecated
|
|
11818
|
+
*/
|
|
11356
11819
|
isInPlace: boolean,
|
|
11820
|
+
/**
|
|
11821
|
+
* @deprecated
|
|
11822
|
+
*/
|
|
11357
11823
|
isMainFrame: boolean,
|
|
11824
|
+
/**
|
|
11825
|
+
* @deprecated
|
|
11826
|
+
*/
|
|
11358
11827
|
frameProcessId: number,
|
|
11828
|
+
/**
|
|
11829
|
+
* @deprecated
|
|
11830
|
+
*/
|
|
11359
11831
|
frameRoutingId: number) => void): this;
|
|
11360
11832
|
/**
|
|
11361
11833
|
* Emitted when the user is requesting to change the zoom level using the mouse
|
|
@@ -11533,7 +12005,7 @@ declare namespace Electron {
|
|
|
11533
12005
|
*/
|
|
11534
12006
|
getBackgroundThrottling(): boolean;
|
|
11535
12007
|
/**
|
|
11536
|
-
* If
|
|
12008
|
+
* If _offscreen rendering_ is enabled returns the current frame rate.
|
|
11537
12009
|
*/
|
|
11538
12010
|
getFrameRate(): number;
|
|
11539
12011
|
/**
|
|
@@ -11644,7 +12116,7 @@ declare namespace Electron {
|
|
|
11644
12116
|
/**
|
|
11645
12117
|
* Schedules a full repaint of the window this web contents is in.
|
|
11646
12118
|
*
|
|
11647
|
-
* If
|
|
12119
|
+
* If _offscreen rendering_ is enabled invalidates the frame and generates a new
|
|
11648
12120
|
* one through the `'paint'` event.
|
|
11649
12121
|
*/
|
|
11650
12122
|
invalidate(): void;
|
|
@@ -11691,11 +12163,11 @@ declare namespace Electron {
|
|
|
11691
12163
|
*/
|
|
11692
12164
|
isLoadingMainFrame(): boolean;
|
|
11693
12165
|
/**
|
|
11694
|
-
* Indicates whether
|
|
12166
|
+
* Indicates whether _offscreen rendering_ is enabled.
|
|
11695
12167
|
*/
|
|
11696
12168
|
isOffscreen(): boolean;
|
|
11697
12169
|
/**
|
|
11698
|
-
* If
|
|
12170
|
+
* If _offscreen rendering_ is enabled returns whether it is currently painting.
|
|
11699
12171
|
*/
|
|
11700
12172
|
isPainting(): boolean;
|
|
11701
12173
|
/**
|
|
@@ -11890,7 +12362,7 @@ declare namespace Electron {
|
|
|
11890
12362
|
*/
|
|
11891
12363
|
setDevToolsWebContents(devToolsWebContents: WebContents): void;
|
|
11892
12364
|
/**
|
|
11893
|
-
* If
|
|
12365
|
+
* If _offscreen rendering_ is enabled sets the frame rate to the specified number.
|
|
11894
12366
|
* Only values between 1 and 240 are accepted.
|
|
11895
12367
|
*/
|
|
11896
12368
|
setFrameRate(fps: number): void;
|
|
@@ -11963,7 +12435,7 @@ declare namespace Electron {
|
|
|
11963
12435
|
*/
|
|
11964
12436
|
startDrag(item: Item): void;
|
|
11965
12437
|
/**
|
|
11966
|
-
* If
|
|
12438
|
+
* If _offscreen rendering_ is enabled and not painting, start painting.
|
|
11967
12439
|
*/
|
|
11968
12440
|
startPainting(): void;
|
|
11969
12441
|
/**
|
|
@@ -11975,7 +12447,7 @@ declare namespace Electron {
|
|
|
11975
12447
|
*/
|
|
11976
12448
|
stopFindInPage(action: 'clearSelection' | 'keepSelection' | 'activateSelection'): void;
|
|
11977
12449
|
/**
|
|
11978
|
-
* If
|
|
12450
|
+
* If _offscreen rendering_ is enabled and painting, stop painting.
|
|
11979
12451
|
*/
|
|
11980
12452
|
stopPainting(): void;
|
|
11981
12453
|
/**
|
|
@@ -12024,7 +12496,7 @@ declare namespace Electron {
|
|
|
12024
12496
|
* An `Integer` property that sets the frame rate of the web contents to the
|
|
12025
12497
|
* specified number. Only values between 1 and 240 are accepted.
|
|
12026
12498
|
*
|
|
12027
|
-
* Only applicable if
|
|
12499
|
+
* Only applicable if _offscreen rendering_ is enabled.
|
|
12028
12500
|
*/
|
|
12029
12501
|
frameRate: number;
|
|
12030
12502
|
/**
|
|
@@ -12105,7 +12577,7 @@ declare namespace Electron {
|
|
|
12105
12577
|
zoomLevel: number;
|
|
12106
12578
|
}
|
|
12107
12579
|
|
|
12108
|
-
interface WebFrame
|
|
12580
|
+
interface WebFrame {
|
|
12109
12581
|
|
|
12110
12582
|
// Docs: https://electronjs.org/docs/api/web-frame
|
|
12111
12583
|
|
|
@@ -12609,8 +13081,8 @@ declare namespace Electron {
|
|
|
12609
13081
|
* Fired when the navigation is done, i.e. the spinner of the tab will stop
|
|
12610
13082
|
* spinning, and the `onload` event is dispatched.
|
|
12611
13083
|
*/
|
|
12612
|
-
addEventListener(event: 'did-finish-load', listener: (event:
|
|
12613
|
-
removeEventListener(event: 'did-finish-load', listener: (event:
|
|
13084
|
+
addEventListener(event: 'did-finish-load', listener: (event: DOMEvent) => void, useCapture?: boolean): this;
|
|
13085
|
+
removeEventListener(event: 'did-finish-load', listener: (event: DOMEvent) => void): this;
|
|
12614
13086
|
/**
|
|
12615
13087
|
* This event is like `did-finish-load`, but fired when the load failed or was
|
|
12616
13088
|
* cancelled, e.g. `window.stop()` is invoked.
|
|
@@ -12625,23 +13097,23 @@ declare namespace Electron {
|
|
|
12625
13097
|
/**
|
|
12626
13098
|
* Corresponds to the points in time when the spinner of the tab starts spinning.
|
|
12627
13099
|
*/
|
|
12628
|
-
addEventListener(event: 'did-start-loading', listener: (event:
|
|
12629
|
-
removeEventListener(event: 'did-start-loading', listener: (event:
|
|
13100
|
+
addEventListener(event: 'did-start-loading', listener: (event: DOMEvent) => void, useCapture?: boolean): this;
|
|
13101
|
+
removeEventListener(event: 'did-start-loading', listener: (event: DOMEvent) => void): this;
|
|
12630
13102
|
/**
|
|
12631
13103
|
* Corresponds to the points in time when the spinner of the tab stops spinning.
|
|
12632
13104
|
*/
|
|
12633
|
-
addEventListener(event: 'did-stop-loading', listener: (event:
|
|
12634
|
-
removeEventListener(event: 'did-stop-loading', listener: (event:
|
|
13105
|
+
addEventListener(event: 'did-stop-loading', listener: (event: DOMEvent) => void, useCapture?: boolean): this;
|
|
13106
|
+
removeEventListener(event: 'did-stop-loading', listener: (event: DOMEvent) => void): this;
|
|
12635
13107
|
/**
|
|
12636
13108
|
* Fired when attached to the embedder web contents.
|
|
12637
13109
|
*/
|
|
12638
|
-
addEventListener(event: 'did-attach', listener: (event:
|
|
12639
|
-
removeEventListener(event: 'did-attach', listener: (event:
|
|
13110
|
+
addEventListener(event: 'did-attach', listener: (event: DOMEvent) => void, useCapture?: boolean): this;
|
|
13111
|
+
removeEventListener(event: 'did-attach', listener: (event: DOMEvent) => void): this;
|
|
12640
13112
|
/**
|
|
12641
13113
|
* Fired when document in the given frame is loaded.
|
|
12642
13114
|
*/
|
|
12643
|
-
addEventListener(event: 'dom-ready', listener: (event:
|
|
12644
|
-
removeEventListener(event: 'dom-ready', listener: (event:
|
|
13115
|
+
addEventListener(event: 'dom-ready', listener: (event: DOMEvent) => void, useCapture?: boolean): this;
|
|
13116
|
+
removeEventListener(event: 'dom-ready', listener: (event: DOMEvent) => void): this;
|
|
12645
13117
|
/**
|
|
12646
13118
|
* Fired when page title is set during navigation. `explicitSet` is false when
|
|
12647
13119
|
* title is synthesized from file url.
|
|
@@ -12656,13 +13128,13 @@ declare namespace Electron {
|
|
|
12656
13128
|
/**
|
|
12657
13129
|
* Fired when page enters fullscreen triggered by HTML API.
|
|
12658
13130
|
*/
|
|
12659
|
-
addEventListener(event: 'enter-html-full-screen', listener: (event:
|
|
12660
|
-
removeEventListener(event: 'enter-html-full-screen', listener: (event:
|
|
13131
|
+
addEventListener(event: 'enter-html-full-screen', listener: (event: DOMEvent) => void, useCapture?: boolean): this;
|
|
13132
|
+
removeEventListener(event: 'enter-html-full-screen', listener: (event: DOMEvent) => void): this;
|
|
12661
13133
|
/**
|
|
12662
13134
|
* Fired when page leaves fullscreen triggered by HTML API.
|
|
12663
13135
|
*/
|
|
12664
|
-
addEventListener(event: 'leave-html-full-screen', listener: (event:
|
|
12665
|
-
removeEventListener(event: 'leave-html-full-screen', listener: (event:
|
|
13136
|
+
addEventListener(event: 'leave-html-full-screen', listener: (event: DOMEvent) => void, useCapture?: boolean): this;
|
|
13137
|
+
removeEventListener(event: 'leave-html-full-screen', listener: (event: DOMEvent) => void): this;
|
|
12666
13138
|
/**
|
|
12667
13139
|
* Fired when the guest window logs a console message.
|
|
12668
13140
|
*
|
|
@@ -12687,10 +13159,26 @@ declare namespace Electron {
|
|
|
12687
13159
|
* or updating the `window.location.hash`. Use `did-navigate-in-page` event for
|
|
12688
13160
|
* this purpose.
|
|
12689
13161
|
*
|
|
12690
|
-
* Calling `event.preventDefault()` does
|
|
13162
|
+
* Calling `event.preventDefault()` does **NOT** have any effect.
|
|
12691
13163
|
*/
|
|
12692
13164
|
addEventListener(event: 'will-navigate', listener: (event: WillNavigateEvent) => void, useCapture?: boolean): this;
|
|
12693
13165
|
removeEventListener(event: 'will-navigate', listener: (event: WillNavigateEvent) => void): this;
|
|
13166
|
+
/**
|
|
13167
|
+
* Emitted when a user or the page wants to start navigation anywhere in the
|
|
13168
|
+
* `<webview>` or any frames embedded within. It can happen when the
|
|
13169
|
+
* `window.location` object is changed or a user clicks a link in the page.
|
|
13170
|
+
*
|
|
13171
|
+
* This event will not emit when the navigation is started programmatically with
|
|
13172
|
+
* APIs like `<webview>.loadURL` and `<webview>.back`.
|
|
13173
|
+
*
|
|
13174
|
+
* It is also not emitted during in-page navigation, such as clicking anchor links
|
|
13175
|
+
* or updating the `window.location.hash`. Use `did-navigate-in-page` event for
|
|
13176
|
+
* this purpose.
|
|
13177
|
+
*
|
|
13178
|
+
* Calling `event.preventDefault()` does **NOT** have any effect.
|
|
13179
|
+
*/
|
|
13180
|
+
addEventListener(event: 'will-frame-navigate', listener: (event: WillFrameNavigateEvent) => void, useCapture?: boolean): this;
|
|
13181
|
+
removeEventListener(event: 'will-frame-navigate', listener: (event: WillFrameNavigateEvent) => void): this;
|
|
12694
13182
|
/**
|
|
12695
13183
|
* Emitted when any frame (including main) starts navigating. `isInPlace` will be
|
|
12696
13184
|
* `true` for in-page navigations.
|
|
@@ -12736,8 +13224,8 @@ declare namespace Electron {
|
|
|
12736
13224
|
* The following example code navigates the `webview` to `about:blank` when the
|
|
12737
13225
|
* guest attempts to close itself.
|
|
12738
13226
|
*/
|
|
12739
|
-
addEventListener(event: 'close', listener: (event:
|
|
12740
|
-
removeEventListener(event: 'close', listener: (event:
|
|
13227
|
+
addEventListener(event: 'close', listener: (event: DOMEvent) => void, useCapture?: boolean): this;
|
|
13228
|
+
removeEventListener(event: 'close', listener: (event: DOMEvent) => void): this;
|
|
12741
13229
|
/**
|
|
12742
13230
|
* Fired when the guest page has sent an asynchronous message to embedder page.
|
|
12743
13231
|
*
|
|
@@ -12749,8 +13237,8 @@ declare namespace Electron {
|
|
|
12749
13237
|
/**
|
|
12750
13238
|
* Fired when the renderer process is crashed.
|
|
12751
13239
|
*/
|
|
12752
|
-
addEventListener(event: 'crashed', listener: (event:
|
|
12753
|
-
removeEventListener(event: 'crashed', listener: (event:
|
|
13240
|
+
addEventListener(event: 'crashed', listener: (event: DOMEvent) => void, useCapture?: boolean): this;
|
|
13241
|
+
removeEventListener(event: 'crashed', listener: (event: DOMEvent) => void): this;
|
|
12754
13242
|
/**
|
|
12755
13243
|
* Fired when a plugin process is crashed.
|
|
12756
13244
|
*/
|
|
@@ -12759,18 +13247,18 @@ declare namespace Electron {
|
|
|
12759
13247
|
/**
|
|
12760
13248
|
* Fired when the WebContents is destroyed.
|
|
12761
13249
|
*/
|
|
12762
|
-
addEventListener(event: 'destroyed', listener: (event:
|
|
12763
|
-
removeEventListener(event: 'destroyed', listener: (event:
|
|
13250
|
+
addEventListener(event: 'destroyed', listener: (event: DOMEvent) => void, useCapture?: boolean): this;
|
|
13251
|
+
removeEventListener(event: 'destroyed', listener: (event: DOMEvent) => void): this;
|
|
12764
13252
|
/**
|
|
12765
13253
|
* Emitted when media starts playing.
|
|
12766
13254
|
*/
|
|
12767
|
-
addEventListener(event: 'media-started-playing', listener: (event:
|
|
12768
|
-
removeEventListener(event: 'media-started-playing', listener: (event:
|
|
13255
|
+
addEventListener(event: 'media-started-playing', listener: (event: DOMEvent) => void, useCapture?: boolean): this;
|
|
13256
|
+
removeEventListener(event: 'media-started-playing', listener: (event: DOMEvent) => void): this;
|
|
12769
13257
|
/**
|
|
12770
13258
|
* Emitted when media is paused or done playing.
|
|
12771
13259
|
*/
|
|
12772
|
-
addEventListener(event: 'media-paused', listener: (event:
|
|
12773
|
-
removeEventListener(event: 'media-paused', listener: (event:
|
|
13260
|
+
addEventListener(event: 'media-paused', listener: (event: DOMEvent) => void, useCapture?: boolean): this;
|
|
13261
|
+
removeEventListener(event: 'media-paused', listener: (event: DOMEvent) => void): this;
|
|
12774
13262
|
/**
|
|
12775
13263
|
* Emitted when a page's theme color changes. This is usually due to encountering a
|
|
12776
13264
|
* meta tag:
|
|
@@ -12791,18 +13279,18 @@ declare namespace Electron {
|
|
|
12791
13279
|
/**
|
|
12792
13280
|
* Emitted when DevTools is opened.
|
|
12793
13281
|
*/
|
|
12794
|
-
addEventListener(event: 'devtools-opened', listener: (event:
|
|
12795
|
-
removeEventListener(event: 'devtools-opened', listener: (event:
|
|
13282
|
+
addEventListener(event: 'devtools-opened', listener: (event: DOMEvent) => void, useCapture?: boolean): this;
|
|
13283
|
+
removeEventListener(event: 'devtools-opened', listener: (event: DOMEvent) => void): this;
|
|
12796
13284
|
/**
|
|
12797
13285
|
* Emitted when DevTools is closed.
|
|
12798
13286
|
*/
|
|
12799
|
-
addEventListener(event: 'devtools-closed', listener: (event:
|
|
12800
|
-
removeEventListener(event: 'devtools-closed', listener: (event:
|
|
13287
|
+
addEventListener(event: 'devtools-closed', listener: (event: DOMEvent) => void, useCapture?: boolean): this;
|
|
13288
|
+
removeEventListener(event: 'devtools-closed', listener: (event: DOMEvent) => void): this;
|
|
12801
13289
|
/**
|
|
12802
13290
|
* Emitted when DevTools is focused / opened.
|
|
12803
13291
|
*/
|
|
12804
|
-
addEventListener(event: 'devtools-focused', listener: (event:
|
|
12805
|
-
removeEventListener(event: 'devtools-focused', listener: (event:
|
|
13292
|
+
addEventListener(event: 'devtools-focused', listener: (event: DOMEvent) => void, useCapture?: boolean): this;
|
|
13293
|
+
removeEventListener(event: 'devtools-focused', listener: (event: DOMEvent) => void): this;
|
|
12806
13294
|
/**
|
|
12807
13295
|
* Emitted when there is a new context menu that needs to be handled.
|
|
12808
13296
|
*/
|
|
@@ -13773,15 +14261,16 @@ declare namespace Electron {
|
|
|
13773
14261
|
*/
|
|
13774
14262
|
partition?: string;
|
|
13775
14263
|
/**
|
|
13776
|
-
* Can be `include` or `
|
|
13777
|
-
* set to `include`, credentials from the session associated with the
|
|
13778
|
-
* be used. If set to `omit`, credentials will not be sent with the
|
|
13779
|
-
* the `'login'` event will not be triggered in the event of a 401).
|
|
13780
|
-
*
|
|
13781
|
-
*
|
|
13782
|
-
*
|
|
14264
|
+
* Can be `include`, `omit` or `same-origin`. Whether to send credentials with this
|
|
14265
|
+
* request. If set to `include`, credentials from the session associated with the
|
|
14266
|
+
* request will be used. If set to `omit`, credentials will not be sent with the
|
|
14267
|
+
* request (and the `'login'` event will not be triggered in the event of a 401).
|
|
14268
|
+
* If set to `same-origin`, `origin` must also be specified. This matches the
|
|
14269
|
+
* behavior of the fetch option of the same name. If this option is not specified,
|
|
14270
|
+
* authentication data from the session will be sent, and cookies will not be sent
|
|
14271
|
+
* (unless `useSessionCookies` is set).
|
|
13783
14272
|
*/
|
|
13784
|
-
credentials?: ('include' | 'omit');
|
|
14273
|
+
credentials?: ('include' | 'omit' | 'same-origin');
|
|
13785
14274
|
/**
|
|
13786
14275
|
* Whether to send cookies with this request from the provided session. If
|
|
13787
14276
|
* `credentials` is specified, this option has no effect. Default is `false`.
|
|
@@ -13820,6 +14309,18 @@ declare namespace Electron {
|
|
|
13820
14309
|
* The origin URL of the request.
|
|
13821
14310
|
*/
|
|
13822
14311
|
origin?: string;
|
|
14312
|
+
/**
|
|
14313
|
+
* can be `""`, `no-referrer`, `no-referrer-when-downgrade`, `origin`,
|
|
14314
|
+
* `origin-when-cross-origin`, `unsafe-url`, `same-origin`, `strict-origin`, or
|
|
14315
|
+
* `strict-origin-when-cross-origin`. Defaults to
|
|
14316
|
+
* `strict-origin-when-cross-origin`.
|
|
14317
|
+
*/
|
|
14318
|
+
referrerPolicy?: string;
|
|
14319
|
+
/**
|
|
14320
|
+
* can be `default`, `no-store`, `reload`, `no-cache`, `force-cache` or
|
|
14321
|
+
* `only-if-cached`.
|
|
14322
|
+
*/
|
|
14323
|
+
cache?: ('default' | 'no-store' | 'reload' | 'no-cache' | 'force-cache' | 'only-if-cached');
|
|
13823
14324
|
}
|
|
13824
14325
|
|
|
13825
14326
|
interface CloseOpts {
|
|
@@ -13885,7 +14386,7 @@ declare namespace Electron {
|
|
|
13885
14386
|
enableAdditionalDnsQueryTypes?: boolean;
|
|
13886
14387
|
}
|
|
13887
14388
|
|
|
13888
|
-
interface ConsoleMessageEvent extends
|
|
14389
|
+
interface ConsoleMessageEvent extends DOMEvent {
|
|
13889
14390
|
/**
|
|
13890
14391
|
* The log level, from 0 to 3. In order it matches `verbose`, `info`, `warning` and
|
|
13891
14392
|
* `error`.
|
|
@@ -13902,7 +14403,7 @@ declare namespace Electron {
|
|
|
13902
14403
|
sourceId: string;
|
|
13903
14404
|
}
|
|
13904
14405
|
|
|
13905
|
-
interface ContextMenuEvent extends
|
|
14406
|
+
interface ContextMenuEvent extends DOMEvent {
|
|
13906
14407
|
params: Params;
|
|
13907
14408
|
}
|
|
13908
14409
|
|
|
@@ -14272,14 +14773,14 @@ declare namespace Electron {
|
|
|
14272
14773
|
device: (HIDDevice) | (SerialPort);
|
|
14273
14774
|
}
|
|
14274
14775
|
|
|
14275
|
-
interface DevtoolsOpenUrlEvent extends
|
|
14776
|
+
interface DevtoolsOpenUrlEvent extends DOMEvent {
|
|
14276
14777
|
/**
|
|
14277
14778
|
* URL of the link that was clicked or selected.
|
|
14278
14779
|
*/
|
|
14279
14780
|
url: string;
|
|
14280
14781
|
}
|
|
14281
14782
|
|
|
14282
|
-
interface DidChangeThemeColorEvent extends
|
|
14783
|
+
interface DidChangeThemeColorEvent extends DOMEvent {
|
|
14283
14784
|
themeColor: string;
|
|
14284
14785
|
}
|
|
14285
14786
|
|
|
@@ -14312,24 +14813,23 @@ declare namespace Electron {
|
|
|
14312
14813
|
*/
|
|
14313
14814
|
postBody?: PostBody;
|
|
14314
14815
|
/**
|
|
14315
|
-
* Can be `default`, `foreground-tab`, `background-tab`, `new-window
|
|
14316
|
-
* `save-to-disk` and `other`.
|
|
14816
|
+
* Can be `default`, `foreground-tab`, `background-tab`, `new-window` or `other`.
|
|
14317
14817
|
*/
|
|
14318
|
-
disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | '
|
|
14818
|
+
disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'other');
|
|
14319
14819
|
}
|
|
14320
14820
|
|
|
14321
|
-
interface DidFailLoadEvent extends
|
|
14821
|
+
interface DidFailLoadEvent extends DOMEvent {
|
|
14322
14822
|
errorCode: number;
|
|
14323
14823
|
errorDescription: string;
|
|
14324
14824
|
validatedURL: string;
|
|
14325
14825
|
isMainFrame: boolean;
|
|
14326
14826
|
}
|
|
14327
14827
|
|
|
14328
|
-
interface DidFrameFinishLoadEvent extends
|
|
14828
|
+
interface DidFrameFinishLoadEvent extends DOMEvent {
|
|
14329
14829
|
isMainFrame: boolean;
|
|
14330
14830
|
}
|
|
14331
14831
|
|
|
14332
|
-
interface DidFrameNavigateEvent extends
|
|
14832
|
+
interface DidFrameNavigateEvent extends DOMEvent {
|
|
14333
14833
|
url: string;
|
|
14334
14834
|
/**
|
|
14335
14835
|
* -1 for non HTTP navigations
|
|
@@ -14344,16 +14844,16 @@ declare namespace Electron {
|
|
|
14344
14844
|
frameRoutingId: number;
|
|
14345
14845
|
}
|
|
14346
14846
|
|
|
14347
|
-
interface DidNavigateEvent extends
|
|
14847
|
+
interface DidNavigateEvent extends DOMEvent {
|
|
14348
14848
|
url: string;
|
|
14349
14849
|
}
|
|
14350
14850
|
|
|
14351
|
-
interface DidNavigateInPageEvent extends
|
|
14851
|
+
interface DidNavigateInPageEvent extends DOMEvent {
|
|
14352
14852
|
isMainFrame: boolean;
|
|
14353
14853
|
url: string;
|
|
14354
14854
|
}
|
|
14355
14855
|
|
|
14356
|
-
interface DidRedirectNavigationEvent extends
|
|
14856
|
+
interface DidRedirectNavigationEvent extends DOMEvent {
|
|
14357
14857
|
url: string;
|
|
14358
14858
|
isInPlace: boolean;
|
|
14359
14859
|
isMainFrame: boolean;
|
|
@@ -14361,7 +14861,7 @@ declare namespace Electron {
|
|
|
14361
14861
|
frameRoutingId: number;
|
|
14362
14862
|
}
|
|
14363
14863
|
|
|
14364
|
-
interface DidStartNavigationEvent extends
|
|
14864
|
+
interface DidStartNavigationEvent extends DOMEvent {
|
|
14365
14865
|
url: string;
|
|
14366
14866
|
isInPlace: boolean;
|
|
14367
14867
|
isMainFrame: boolean;
|
|
@@ -14524,7 +15024,7 @@ declare namespace Electron {
|
|
|
14524
15024
|
allowLoadingUnsignedLibraries?: boolean;
|
|
14525
15025
|
}
|
|
14526
15026
|
|
|
14527
|
-
interface FoundInPageEvent extends
|
|
15027
|
+
interface FoundInPageEvent extends DOMEvent {
|
|
14528
15028
|
result: FoundInPageResult;
|
|
14529
15029
|
}
|
|
14530
15030
|
|
|
@@ -14539,6 +15039,13 @@ declare namespace Electron {
|
|
|
14539
15039
|
cache: boolean;
|
|
14540
15040
|
}
|
|
14541
15041
|
|
|
15042
|
+
interface FromPathOptions {
|
|
15043
|
+
/**
|
|
15044
|
+
* Whether to enable cache.
|
|
15045
|
+
*/
|
|
15046
|
+
cache: boolean;
|
|
15047
|
+
}
|
|
15048
|
+
|
|
14542
15049
|
interface HandlerDetails {
|
|
14543
15050
|
/**
|
|
14544
15051
|
* The _resolved_ version of the URL passed to `window.open()`. e.g. opening a
|
|
@@ -14555,10 +15062,9 @@ declare namespace Electron {
|
|
|
14555
15062
|
*/
|
|
14556
15063
|
features: string;
|
|
14557
15064
|
/**
|
|
14558
|
-
* Can be `default`, `foreground-tab`, `background-tab`, `new-window
|
|
14559
|
-
* `save-to-disk` or `other`.
|
|
15065
|
+
* Can be `default`, `foreground-tab`, `background-tab`, `new-window` or `other`.
|
|
14560
15066
|
*/
|
|
14561
|
-
disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | '
|
|
15067
|
+
disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'other');
|
|
14562
15068
|
/**
|
|
14563
15069
|
* The referrer that will be passed to the new window. May or may not result in the
|
|
14564
15070
|
* `Referer` header being sent, depending on the referrer policy.
|
|
@@ -14708,7 +15214,7 @@ declare namespace Electron {
|
|
|
14708
15214
|
cssOrigin?: string;
|
|
14709
15215
|
}
|
|
14710
15216
|
|
|
14711
|
-
interface IpcMessageEvent extends
|
|
15217
|
+
interface IpcMessageEvent extends DOMEvent {
|
|
14712
15218
|
/**
|
|
14713
15219
|
* pair of `[processId, frameId]`.
|
|
14714
15220
|
*/
|
|
@@ -14748,7 +15254,7 @@ declare namespace Electron {
|
|
|
14748
15254
|
removedItems: JumpListItem[];
|
|
14749
15255
|
}
|
|
14750
15256
|
|
|
14751
|
-
interface LoadCommitEvent extends
|
|
15257
|
+
interface LoadCommitEvent extends DOMEvent {
|
|
14752
15258
|
url: string;
|
|
14753
15259
|
isMainFrame: boolean;
|
|
14754
15260
|
}
|
|
@@ -15525,14 +16031,14 @@ declare namespace Electron {
|
|
|
15525
16031
|
stayAwake?: boolean;
|
|
15526
16032
|
}
|
|
15527
16033
|
|
|
15528
|
-
interface PageFaviconUpdatedEvent extends
|
|
16034
|
+
interface PageFaviconUpdatedEvent extends DOMEvent {
|
|
15529
16035
|
/**
|
|
15530
16036
|
* Array of URLs.
|
|
15531
16037
|
*/
|
|
15532
16038
|
favicons: string[];
|
|
15533
16039
|
}
|
|
15534
16040
|
|
|
15535
|
-
interface PageTitleUpdatedEvent extends
|
|
16041
|
+
interface PageTitleUpdatedEvent extends DOMEvent {
|
|
15536
16042
|
title: string;
|
|
15537
16043
|
explicitSet: boolean;
|
|
15538
16044
|
}
|
|
@@ -15634,7 +16140,7 @@ declare namespace Electron {
|
|
|
15634
16140
|
isMainFrame: boolean;
|
|
15635
16141
|
}
|
|
15636
16142
|
|
|
15637
|
-
interface PluginCrashedEvent extends
|
|
16143
|
+
interface PluginCrashedEvent extends DOMEvent {
|
|
15638
16144
|
name: string;
|
|
15639
16145
|
version: string;
|
|
15640
16146
|
}
|
|
@@ -15853,6 +16359,32 @@ declare namespace Electron {
|
|
|
15853
16359
|
quality?: string;
|
|
15854
16360
|
}
|
|
15855
16361
|
|
|
16362
|
+
interface ResolveHostOptions {
|
|
16363
|
+
/**
|
|
16364
|
+
* Requested DNS query type. If unspecified, resolver will pick A or AAAA (or both)
|
|
16365
|
+
* based on IPv4/IPv6 settings:
|
|
16366
|
+
*/
|
|
16367
|
+
queryType?: ('A' | 'AAAA');
|
|
16368
|
+
/**
|
|
16369
|
+
* The source to use for resolved addresses. Default allows the resolver to pick an
|
|
16370
|
+
* appropriate source. Only affects use of big external sources (e.g. calling the
|
|
16371
|
+
* system for resolution or using DNS). Even if a source is specified, results can
|
|
16372
|
+
* still come from cache, resolving "localhost" or IP literals, etc. One of the
|
|
16373
|
+
* following values:
|
|
16374
|
+
*/
|
|
16375
|
+
source?: ('any' | 'system' | 'dns' | 'mdns' | 'localOnly');
|
|
16376
|
+
/**
|
|
16377
|
+
* Indicates what DNS cache entries, if any, can be used to provide a response. One
|
|
16378
|
+
* of the following values:
|
|
16379
|
+
*/
|
|
16380
|
+
cacheUsage?: ('allowed' | 'staleAllowed' | 'disallowed');
|
|
16381
|
+
/**
|
|
16382
|
+
* Controls the resolver's Secure DNS behavior for this request. One of the
|
|
16383
|
+
* following values:
|
|
16384
|
+
*/
|
|
16385
|
+
secureDnsPolicy?: ('allow' | 'disable');
|
|
16386
|
+
}
|
|
16387
|
+
|
|
15856
16388
|
interface ResourceUsage {
|
|
15857
16389
|
images: MemoryUsageDetails;
|
|
15858
16390
|
scripts: MemoryUsageDetails;
|
|
@@ -16404,7 +16936,7 @@ declare namespace Electron {
|
|
|
16404
16936
|
percentage: number;
|
|
16405
16937
|
}
|
|
16406
16938
|
|
|
16407
|
-
interface UpdateTargetUrlEvent extends
|
|
16939
|
+
interface UpdateTargetUrlEvent extends DOMEvent {
|
|
16408
16940
|
url: string;
|
|
16409
16941
|
}
|
|
16410
16942
|
|
|
@@ -16466,6 +16998,69 @@ declare namespace Electron {
|
|
|
16466
16998
|
skipTransformProcessType?: boolean;
|
|
16467
16999
|
}
|
|
16468
17000
|
|
|
17001
|
+
interface WebContentsAudioStateChangedEventParams {
|
|
17002
|
+
/**
|
|
17003
|
+
* True if one or more frames or child `webContents` are emitting audio.
|
|
17004
|
+
*/
|
|
17005
|
+
audible: boolean;
|
|
17006
|
+
}
|
|
17007
|
+
|
|
17008
|
+
interface WebContentsDidRedirectNavigationEventParams {
|
|
17009
|
+
/**
|
|
17010
|
+
* The URL the frame is navigating to.
|
|
17011
|
+
*/
|
|
17012
|
+
url: string;
|
|
17013
|
+
/**
|
|
17014
|
+
* Whether the navigation happened without changing document. Examples of same
|
|
17015
|
+
* document navigations are reference fragment navigations, pushState/replaceState,
|
|
17016
|
+
* and same page history navigation.
|
|
17017
|
+
*/
|
|
17018
|
+
isSameDocument: boolean;
|
|
17019
|
+
/**
|
|
17020
|
+
* True if the navigation is taking place in a main frame.
|
|
17021
|
+
*/
|
|
17022
|
+
isMainFrame: boolean;
|
|
17023
|
+
/**
|
|
17024
|
+
* The frame to be navigated.
|
|
17025
|
+
*/
|
|
17026
|
+
frame: WebFrameMain;
|
|
17027
|
+
/**
|
|
17028
|
+
* The frame which initiated the navigation, which can be a parent frame (e.g. via
|
|
17029
|
+
* `window.open` with a frame's name), or null if the navigation was not initiated
|
|
17030
|
+
* by a frame. This can also be null if the initiating frame was deleted before the
|
|
17031
|
+
* event was emitted.
|
|
17032
|
+
*/
|
|
17033
|
+
initiator?: WebFrameMain;
|
|
17034
|
+
}
|
|
17035
|
+
|
|
17036
|
+
interface WebContentsDidStartNavigationEventParams {
|
|
17037
|
+
/**
|
|
17038
|
+
* The URL the frame is navigating to.
|
|
17039
|
+
*/
|
|
17040
|
+
url: string;
|
|
17041
|
+
/**
|
|
17042
|
+
* Whether the navigation happened without changing document. Examples of same
|
|
17043
|
+
* document navigations are reference fragment navigations, pushState/replaceState,
|
|
17044
|
+
* and same page history navigation.
|
|
17045
|
+
*/
|
|
17046
|
+
isSameDocument: boolean;
|
|
17047
|
+
/**
|
|
17048
|
+
* True if the navigation is taking place in a main frame.
|
|
17049
|
+
*/
|
|
17050
|
+
isMainFrame: boolean;
|
|
17051
|
+
/**
|
|
17052
|
+
* The frame to be navigated.
|
|
17053
|
+
*/
|
|
17054
|
+
frame: WebFrameMain;
|
|
17055
|
+
/**
|
|
17056
|
+
* The frame which initiated the navigation, which can be a parent frame (e.g. via
|
|
17057
|
+
* `window.open` with a frame's name), or null if the navigation was not initiated
|
|
17058
|
+
* by a frame. This can also be null if the initiating frame was deleted before the
|
|
17059
|
+
* event was emitted.
|
|
17060
|
+
*/
|
|
17061
|
+
initiator?: WebFrameMain;
|
|
17062
|
+
}
|
|
17063
|
+
|
|
16469
17064
|
interface WebContentsPrintOptions {
|
|
16470
17065
|
/**
|
|
16471
17066
|
* Don't ask user for print settings. Default is `false`.
|
|
@@ -16532,6 +17127,84 @@ declare namespace Electron {
|
|
|
16532
17127
|
pageSize?: (string) | (Size);
|
|
16533
17128
|
}
|
|
16534
17129
|
|
|
17130
|
+
interface WebContentsWillFrameNavigateEventParams {
|
|
17131
|
+
/**
|
|
17132
|
+
* The URL the frame is navigating to.
|
|
17133
|
+
*/
|
|
17134
|
+
url: string;
|
|
17135
|
+
/**
|
|
17136
|
+
* True if the navigation is taking place in a main frame.
|
|
17137
|
+
*/
|
|
17138
|
+
isMainFrame: boolean;
|
|
17139
|
+
/**
|
|
17140
|
+
* The frame to be navigated.
|
|
17141
|
+
*/
|
|
17142
|
+
frame: WebFrameMain;
|
|
17143
|
+
/**
|
|
17144
|
+
* The frame which initiated the navigation, which can be a parent frame (e.g. via
|
|
17145
|
+
* `window.open` with a frame's name), or null if the navigation was not initiated
|
|
17146
|
+
* by a frame. This can also be null if the initiating frame was deleted before the
|
|
17147
|
+
* event was emitted.
|
|
17148
|
+
*/
|
|
17149
|
+
initiator?: WebFrameMain;
|
|
17150
|
+
}
|
|
17151
|
+
|
|
17152
|
+
interface WebContentsWillNavigateEventParams {
|
|
17153
|
+
/**
|
|
17154
|
+
* The URL the frame is navigating to.
|
|
17155
|
+
*/
|
|
17156
|
+
url: string;
|
|
17157
|
+
/**
|
|
17158
|
+
* Whether the navigation happened without changing document. Examples of same
|
|
17159
|
+
* document navigations are reference fragment navigations, pushState/replaceState,
|
|
17160
|
+
* and same page history navigation.
|
|
17161
|
+
*/
|
|
17162
|
+
isSameDocument: boolean;
|
|
17163
|
+
/**
|
|
17164
|
+
* True if the navigation is taking place in a main frame.
|
|
17165
|
+
*/
|
|
17166
|
+
isMainFrame: boolean;
|
|
17167
|
+
/**
|
|
17168
|
+
* The frame to be navigated.
|
|
17169
|
+
*/
|
|
17170
|
+
frame: WebFrameMain;
|
|
17171
|
+
/**
|
|
17172
|
+
* The frame which initiated the navigation, which can be a parent frame (e.g. via
|
|
17173
|
+
* `window.open` with a frame's name), or null if the navigation was not initiated
|
|
17174
|
+
* by a frame. This can also be null if the initiating frame was deleted before the
|
|
17175
|
+
* event was emitted.
|
|
17176
|
+
*/
|
|
17177
|
+
initiator?: WebFrameMain;
|
|
17178
|
+
}
|
|
17179
|
+
|
|
17180
|
+
interface WebContentsWillRedirectEventParams {
|
|
17181
|
+
/**
|
|
17182
|
+
* The URL the frame is navigating to.
|
|
17183
|
+
*/
|
|
17184
|
+
url: string;
|
|
17185
|
+
/**
|
|
17186
|
+
* Whether the navigation happened without changing document. Examples of same
|
|
17187
|
+
* document navigations are reference fragment navigations, pushState/replaceState,
|
|
17188
|
+
* and same page history navigation.
|
|
17189
|
+
*/
|
|
17190
|
+
isSameDocument: boolean;
|
|
17191
|
+
/**
|
|
17192
|
+
* True if the navigation is taking place in a main frame.
|
|
17193
|
+
*/
|
|
17194
|
+
isMainFrame: boolean;
|
|
17195
|
+
/**
|
|
17196
|
+
* The frame to be navigated.
|
|
17197
|
+
*/
|
|
17198
|
+
frame: WebFrameMain;
|
|
17199
|
+
/**
|
|
17200
|
+
* The frame which initiated the navigation, which can be a parent frame (e.g. via
|
|
17201
|
+
* `window.open` with a frame's name), or null if the navigation was not initiated
|
|
17202
|
+
* by a frame. This can also be null if the initiating frame was deleted before the
|
|
17203
|
+
* event was emitted.
|
|
17204
|
+
*/
|
|
17205
|
+
initiator?: WebFrameMain;
|
|
17206
|
+
}
|
|
17207
|
+
|
|
16535
17208
|
interface WebviewTagPrintOptions {
|
|
16536
17209
|
/**
|
|
16537
17210
|
* Don't ask user for print settings. Default is `false`.
|
|
@@ -16597,7 +17270,14 @@ declare namespace Electron {
|
|
|
16597
17270
|
pageSize?: (string) | (Size);
|
|
16598
17271
|
}
|
|
16599
17272
|
|
|
16600
|
-
interface
|
|
17273
|
+
interface WillFrameNavigateEvent extends DOMEvent {
|
|
17274
|
+
url: string;
|
|
17275
|
+
isMainFrame: boolean;
|
|
17276
|
+
frameProcessId: number;
|
|
17277
|
+
frameRoutingId: number;
|
|
17278
|
+
}
|
|
17279
|
+
|
|
17280
|
+
interface WillNavigateEvent extends DOMEvent {
|
|
16601
17281
|
url: string;
|
|
16602
17282
|
}
|
|
16603
17283
|
|
|
@@ -17238,6 +17918,7 @@ declare namespace Electron {
|
|
|
17238
17918
|
|
|
17239
17919
|
|
|
17240
17920
|
namespace Common {
|
|
17921
|
+
type Event<Params extends object = {}> = Electron.Event<Params>;
|
|
17241
17922
|
const clipboard: Clipboard;
|
|
17242
17923
|
type Clipboard = Electron.Clipboard;
|
|
17243
17924
|
const crashReporter: CrashReporter;
|
|
@@ -17302,6 +17983,7 @@ declare namespace Electron {
|
|
|
17302
17983
|
type FoundInPageEvent = Electron.FoundInPageEvent;
|
|
17303
17984
|
type FrameCreatedDetails = Electron.FrameCreatedDetails;
|
|
17304
17985
|
type FromPartitionOptions = Electron.FromPartitionOptions;
|
|
17986
|
+
type FromPathOptions = Electron.FromPathOptions;
|
|
17305
17987
|
type HandlerDetails = Electron.HandlerDetails;
|
|
17306
17988
|
type HeadersReceivedResponse = Electron.HeadersReceivedResponse;
|
|
17307
17989
|
type HeapStatistics = Electron.HeapStatistics;
|
|
@@ -17365,6 +18047,7 @@ declare namespace Electron {
|
|
|
17365
18047
|
type RenderProcessGoneDetails = Electron.RenderProcessGoneDetails;
|
|
17366
18048
|
type Request = Electron.Request;
|
|
17367
18049
|
type ResizeOptions = Electron.ResizeOptions;
|
|
18050
|
+
type ResolveHostOptions = Electron.ResolveHostOptions;
|
|
17368
18051
|
type ResourceUsage = Electron.ResourceUsage;
|
|
17369
18052
|
type Response = Electron.Response;
|
|
17370
18053
|
type Result = Electron.Result;
|
|
@@ -17402,8 +18085,15 @@ declare namespace Electron {
|
|
|
17402
18085
|
type UsbDeviceRemovedDetails = Electron.UsbDeviceRemovedDetails;
|
|
17403
18086
|
type UsbDeviceRevokedDetails = Electron.UsbDeviceRevokedDetails;
|
|
17404
18087
|
type VisibleOnAllWorkspacesOptions = Electron.VisibleOnAllWorkspacesOptions;
|
|
18088
|
+
type WebContentsAudioStateChangedEventParams = Electron.WebContentsAudioStateChangedEventParams;
|
|
18089
|
+
type WebContentsDidRedirectNavigationEventParams = Electron.WebContentsDidRedirectNavigationEventParams;
|
|
18090
|
+
type WebContentsDidStartNavigationEventParams = Electron.WebContentsDidStartNavigationEventParams;
|
|
17405
18091
|
type WebContentsPrintOptions = Electron.WebContentsPrintOptions;
|
|
18092
|
+
type WebContentsWillFrameNavigateEventParams = Electron.WebContentsWillFrameNavigateEventParams;
|
|
18093
|
+
type WebContentsWillNavigateEventParams = Electron.WebContentsWillNavigateEventParams;
|
|
18094
|
+
type WebContentsWillRedirectEventParams = Electron.WebContentsWillRedirectEventParams;
|
|
17406
18095
|
type WebviewTagPrintOptions = Electron.WebviewTagPrintOptions;
|
|
18096
|
+
type WillFrameNavigateEvent = Electron.WillFrameNavigateEvent;
|
|
17407
18097
|
type WillNavigateEvent = Electron.WillNavigateEvent;
|
|
17408
18098
|
type WillResizeDetails = Electron.WillResizeDetails;
|
|
17409
18099
|
type EditFlags = Electron.EditFlags;
|
|
@@ -17427,7 +18117,6 @@ declare namespace Electron {
|
|
|
17427
18117
|
type CustomScheme = Electron.CustomScheme;
|
|
17428
18118
|
type DesktopCapturerSource = Electron.DesktopCapturerSource;
|
|
17429
18119
|
type Display = Electron.Display;
|
|
17430
|
-
type Event = Electron.Event;
|
|
17431
18120
|
type Extension = Electron.Extension;
|
|
17432
18121
|
type ExtensionInfo = Electron.ExtensionInfo;
|
|
17433
18122
|
type FileFilter = Electron.FileFilter;
|
|
@@ -17464,6 +18153,8 @@ declare namespace Electron {
|
|
|
17464
18153
|
type ProtocolResponseUploadData = Electron.ProtocolResponseUploadData;
|
|
17465
18154
|
type Rectangle = Electron.Rectangle;
|
|
17466
18155
|
type Referrer = Electron.Referrer;
|
|
18156
|
+
type ResolvedEndpoint = Electron.ResolvedEndpoint;
|
|
18157
|
+
type ResolvedHost = Electron.ResolvedHost;
|
|
17467
18158
|
type ScrubberItem = Electron.ScrubberItem;
|
|
17468
18159
|
type SegmentedControlSegment = Electron.SegmentedControlSegment;
|
|
17469
18160
|
type SerialPort = Electron.SerialPort;
|
|
@@ -17487,6 +18178,7 @@ declare namespace Electron {
|
|
|
17487
18178
|
}
|
|
17488
18179
|
|
|
17489
18180
|
namespace Main {
|
|
18181
|
+
type Event<Params extends object = {}> = Electron.Event<Params>;
|
|
17490
18182
|
const app: App;
|
|
17491
18183
|
type App = Electron.App;
|
|
17492
18184
|
const autoUpdater: AutoUpdater;
|
|
@@ -17616,6 +18308,7 @@ declare namespace Electron {
|
|
|
17616
18308
|
type FoundInPageEvent = Electron.FoundInPageEvent;
|
|
17617
18309
|
type FrameCreatedDetails = Electron.FrameCreatedDetails;
|
|
17618
18310
|
type FromPartitionOptions = Electron.FromPartitionOptions;
|
|
18311
|
+
type FromPathOptions = Electron.FromPathOptions;
|
|
17619
18312
|
type HandlerDetails = Electron.HandlerDetails;
|
|
17620
18313
|
type HeadersReceivedResponse = Electron.HeadersReceivedResponse;
|
|
17621
18314
|
type HeapStatistics = Electron.HeapStatistics;
|
|
@@ -17679,6 +18372,7 @@ declare namespace Electron {
|
|
|
17679
18372
|
type RenderProcessGoneDetails = Electron.RenderProcessGoneDetails;
|
|
17680
18373
|
type Request = Electron.Request;
|
|
17681
18374
|
type ResizeOptions = Electron.ResizeOptions;
|
|
18375
|
+
type ResolveHostOptions = Electron.ResolveHostOptions;
|
|
17682
18376
|
type ResourceUsage = Electron.ResourceUsage;
|
|
17683
18377
|
type Response = Electron.Response;
|
|
17684
18378
|
type Result = Electron.Result;
|
|
@@ -17716,8 +18410,15 @@ declare namespace Electron {
|
|
|
17716
18410
|
type UsbDeviceRemovedDetails = Electron.UsbDeviceRemovedDetails;
|
|
17717
18411
|
type UsbDeviceRevokedDetails = Electron.UsbDeviceRevokedDetails;
|
|
17718
18412
|
type VisibleOnAllWorkspacesOptions = Electron.VisibleOnAllWorkspacesOptions;
|
|
18413
|
+
type WebContentsAudioStateChangedEventParams = Electron.WebContentsAudioStateChangedEventParams;
|
|
18414
|
+
type WebContentsDidRedirectNavigationEventParams = Electron.WebContentsDidRedirectNavigationEventParams;
|
|
18415
|
+
type WebContentsDidStartNavigationEventParams = Electron.WebContentsDidStartNavigationEventParams;
|
|
17719
18416
|
type WebContentsPrintOptions = Electron.WebContentsPrintOptions;
|
|
18417
|
+
type WebContentsWillFrameNavigateEventParams = Electron.WebContentsWillFrameNavigateEventParams;
|
|
18418
|
+
type WebContentsWillNavigateEventParams = Electron.WebContentsWillNavigateEventParams;
|
|
18419
|
+
type WebContentsWillRedirectEventParams = Electron.WebContentsWillRedirectEventParams;
|
|
17720
18420
|
type WebviewTagPrintOptions = Electron.WebviewTagPrintOptions;
|
|
18421
|
+
type WillFrameNavigateEvent = Electron.WillFrameNavigateEvent;
|
|
17721
18422
|
type WillNavigateEvent = Electron.WillNavigateEvent;
|
|
17722
18423
|
type WillResizeDetails = Electron.WillResizeDetails;
|
|
17723
18424
|
type EditFlags = Electron.EditFlags;
|
|
@@ -17741,7 +18442,6 @@ declare namespace Electron {
|
|
|
17741
18442
|
type CustomScheme = Electron.CustomScheme;
|
|
17742
18443
|
type DesktopCapturerSource = Electron.DesktopCapturerSource;
|
|
17743
18444
|
type Display = Electron.Display;
|
|
17744
|
-
type Event = Electron.Event;
|
|
17745
18445
|
type Extension = Electron.Extension;
|
|
17746
18446
|
type ExtensionInfo = Electron.ExtensionInfo;
|
|
17747
18447
|
type FileFilter = Electron.FileFilter;
|
|
@@ -17778,6 +18478,8 @@ declare namespace Electron {
|
|
|
17778
18478
|
type ProtocolResponseUploadData = Electron.ProtocolResponseUploadData;
|
|
17779
18479
|
type Rectangle = Electron.Rectangle;
|
|
17780
18480
|
type Referrer = Electron.Referrer;
|
|
18481
|
+
type ResolvedEndpoint = Electron.ResolvedEndpoint;
|
|
18482
|
+
type ResolvedHost = Electron.ResolvedHost;
|
|
17781
18483
|
type ScrubberItem = Electron.ScrubberItem;
|
|
17782
18484
|
type SegmentedControlSegment = Electron.SegmentedControlSegment;
|
|
17783
18485
|
type SerialPort = Electron.SerialPort;
|
|
@@ -17801,12 +18503,14 @@ declare namespace Electron {
|
|
|
17801
18503
|
}
|
|
17802
18504
|
|
|
17803
18505
|
namespace Renderer {
|
|
18506
|
+
type Event<Params extends object = {}> = Electron.Event<Params>;
|
|
17804
18507
|
const contextBridge: ContextBridge;
|
|
17805
18508
|
type ContextBridge = Electron.ContextBridge;
|
|
17806
18509
|
const ipcRenderer: IpcRenderer;
|
|
17807
18510
|
type IpcRenderer = Electron.IpcRenderer;
|
|
17808
18511
|
const webFrame: WebFrame;
|
|
17809
18512
|
type WebFrame = Electron.WebFrame;
|
|
18513
|
+
type WebviewTag = Electron.WebviewTag;
|
|
17810
18514
|
type AboutPanelOptionsOptions = Electron.AboutPanelOptionsOptions;
|
|
17811
18515
|
type AddRepresentationOptions = Electron.AddRepresentationOptions;
|
|
17812
18516
|
type AnimationSettings = Electron.AnimationSettings;
|
|
@@ -17863,6 +18567,7 @@ declare namespace Electron {
|
|
|
17863
18567
|
type FoundInPageEvent = Electron.FoundInPageEvent;
|
|
17864
18568
|
type FrameCreatedDetails = Electron.FrameCreatedDetails;
|
|
17865
18569
|
type FromPartitionOptions = Electron.FromPartitionOptions;
|
|
18570
|
+
type FromPathOptions = Electron.FromPathOptions;
|
|
17866
18571
|
type HandlerDetails = Electron.HandlerDetails;
|
|
17867
18572
|
type HeadersReceivedResponse = Electron.HeadersReceivedResponse;
|
|
17868
18573
|
type HeapStatistics = Electron.HeapStatistics;
|
|
@@ -17926,6 +18631,7 @@ declare namespace Electron {
|
|
|
17926
18631
|
type RenderProcessGoneDetails = Electron.RenderProcessGoneDetails;
|
|
17927
18632
|
type Request = Electron.Request;
|
|
17928
18633
|
type ResizeOptions = Electron.ResizeOptions;
|
|
18634
|
+
type ResolveHostOptions = Electron.ResolveHostOptions;
|
|
17929
18635
|
type ResourceUsage = Electron.ResourceUsage;
|
|
17930
18636
|
type Response = Electron.Response;
|
|
17931
18637
|
type Result = Electron.Result;
|
|
@@ -17963,8 +18669,15 @@ declare namespace Electron {
|
|
|
17963
18669
|
type UsbDeviceRemovedDetails = Electron.UsbDeviceRemovedDetails;
|
|
17964
18670
|
type UsbDeviceRevokedDetails = Electron.UsbDeviceRevokedDetails;
|
|
17965
18671
|
type VisibleOnAllWorkspacesOptions = Electron.VisibleOnAllWorkspacesOptions;
|
|
18672
|
+
type WebContentsAudioStateChangedEventParams = Electron.WebContentsAudioStateChangedEventParams;
|
|
18673
|
+
type WebContentsDidRedirectNavigationEventParams = Electron.WebContentsDidRedirectNavigationEventParams;
|
|
18674
|
+
type WebContentsDidStartNavigationEventParams = Electron.WebContentsDidStartNavigationEventParams;
|
|
17966
18675
|
type WebContentsPrintOptions = Electron.WebContentsPrintOptions;
|
|
18676
|
+
type WebContentsWillFrameNavigateEventParams = Electron.WebContentsWillFrameNavigateEventParams;
|
|
18677
|
+
type WebContentsWillNavigateEventParams = Electron.WebContentsWillNavigateEventParams;
|
|
18678
|
+
type WebContentsWillRedirectEventParams = Electron.WebContentsWillRedirectEventParams;
|
|
17967
18679
|
type WebviewTagPrintOptions = Electron.WebviewTagPrintOptions;
|
|
18680
|
+
type WillFrameNavigateEvent = Electron.WillFrameNavigateEvent;
|
|
17968
18681
|
type WillNavigateEvent = Electron.WillNavigateEvent;
|
|
17969
18682
|
type WillResizeDetails = Electron.WillResizeDetails;
|
|
17970
18683
|
type EditFlags = Electron.EditFlags;
|
|
@@ -17988,7 +18701,6 @@ declare namespace Electron {
|
|
|
17988
18701
|
type CustomScheme = Electron.CustomScheme;
|
|
17989
18702
|
type DesktopCapturerSource = Electron.DesktopCapturerSource;
|
|
17990
18703
|
type Display = Electron.Display;
|
|
17991
|
-
type Event = Electron.Event;
|
|
17992
18704
|
type Extension = Electron.Extension;
|
|
17993
18705
|
type ExtensionInfo = Electron.ExtensionInfo;
|
|
17994
18706
|
type FileFilter = Electron.FileFilter;
|
|
@@ -18025,6 +18737,8 @@ declare namespace Electron {
|
|
|
18025
18737
|
type ProtocolResponseUploadData = Electron.ProtocolResponseUploadData;
|
|
18026
18738
|
type Rectangle = Electron.Rectangle;
|
|
18027
18739
|
type Referrer = Electron.Referrer;
|
|
18740
|
+
type ResolvedEndpoint = Electron.ResolvedEndpoint;
|
|
18741
|
+
type ResolvedHost = Electron.ResolvedHost;
|
|
18028
18742
|
type ScrubberItem = Electron.ScrubberItem;
|
|
18029
18743
|
type SegmentedControlSegment = Electron.SegmentedControlSegment;
|
|
18030
18744
|
type SerialPort = Electron.SerialPort;
|
|
@@ -18048,6 +18762,7 @@ declare namespace Electron {
|
|
|
18048
18762
|
}
|
|
18049
18763
|
|
|
18050
18764
|
namespace CrossProcessExports {
|
|
18765
|
+
type Event<Params extends object = {}> = Electron.Event<Params>;
|
|
18051
18766
|
const app: App;
|
|
18052
18767
|
type App = Electron.App;
|
|
18053
18768
|
const autoUpdater: AutoUpdater;
|
|
@@ -18135,6 +18850,7 @@ declare namespace Electron {
|
|
|
18135
18850
|
const webFrameMain: typeof WebFrameMain;
|
|
18136
18851
|
type WebFrameMain = Electron.WebFrameMain;
|
|
18137
18852
|
type WebRequest = Electron.WebRequest;
|
|
18853
|
+
type WebviewTag = Electron.WebviewTag;
|
|
18138
18854
|
type AboutPanelOptionsOptions = Electron.AboutPanelOptionsOptions;
|
|
18139
18855
|
type AddRepresentationOptions = Electron.AddRepresentationOptions;
|
|
18140
18856
|
type AnimationSettings = Electron.AnimationSettings;
|
|
@@ -18191,6 +18907,7 @@ declare namespace Electron {
|
|
|
18191
18907
|
type FoundInPageEvent = Electron.FoundInPageEvent;
|
|
18192
18908
|
type FrameCreatedDetails = Electron.FrameCreatedDetails;
|
|
18193
18909
|
type FromPartitionOptions = Electron.FromPartitionOptions;
|
|
18910
|
+
type FromPathOptions = Electron.FromPathOptions;
|
|
18194
18911
|
type HandlerDetails = Electron.HandlerDetails;
|
|
18195
18912
|
type HeadersReceivedResponse = Electron.HeadersReceivedResponse;
|
|
18196
18913
|
type HeapStatistics = Electron.HeapStatistics;
|
|
@@ -18254,6 +18971,7 @@ declare namespace Electron {
|
|
|
18254
18971
|
type RenderProcessGoneDetails = Electron.RenderProcessGoneDetails;
|
|
18255
18972
|
type Request = Electron.Request;
|
|
18256
18973
|
type ResizeOptions = Electron.ResizeOptions;
|
|
18974
|
+
type ResolveHostOptions = Electron.ResolveHostOptions;
|
|
18257
18975
|
type ResourceUsage = Electron.ResourceUsage;
|
|
18258
18976
|
type Response = Electron.Response;
|
|
18259
18977
|
type Result = Electron.Result;
|
|
@@ -18291,8 +19009,15 @@ declare namespace Electron {
|
|
|
18291
19009
|
type UsbDeviceRemovedDetails = Electron.UsbDeviceRemovedDetails;
|
|
18292
19010
|
type UsbDeviceRevokedDetails = Electron.UsbDeviceRevokedDetails;
|
|
18293
19011
|
type VisibleOnAllWorkspacesOptions = Electron.VisibleOnAllWorkspacesOptions;
|
|
19012
|
+
type WebContentsAudioStateChangedEventParams = Electron.WebContentsAudioStateChangedEventParams;
|
|
19013
|
+
type WebContentsDidRedirectNavigationEventParams = Electron.WebContentsDidRedirectNavigationEventParams;
|
|
19014
|
+
type WebContentsDidStartNavigationEventParams = Electron.WebContentsDidStartNavigationEventParams;
|
|
18294
19015
|
type WebContentsPrintOptions = Electron.WebContentsPrintOptions;
|
|
19016
|
+
type WebContentsWillFrameNavigateEventParams = Electron.WebContentsWillFrameNavigateEventParams;
|
|
19017
|
+
type WebContentsWillNavigateEventParams = Electron.WebContentsWillNavigateEventParams;
|
|
19018
|
+
type WebContentsWillRedirectEventParams = Electron.WebContentsWillRedirectEventParams;
|
|
18295
19019
|
type WebviewTagPrintOptions = Electron.WebviewTagPrintOptions;
|
|
19020
|
+
type WillFrameNavigateEvent = Electron.WillFrameNavigateEvent;
|
|
18296
19021
|
type WillNavigateEvent = Electron.WillNavigateEvent;
|
|
18297
19022
|
type WillResizeDetails = Electron.WillResizeDetails;
|
|
18298
19023
|
type EditFlags = Electron.EditFlags;
|
|
@@ -18316,7 +19041,6 @@ declare namespace Electron {
|
|
|
18316
19041
|
type CustomScheme = Electron.CustomScheme;
|
|
18317
19042
|
type DesktopCapturerSource = Electron.DesktopCapturerSource;
|
|
18318
19043
|
type Display = Electron.Display;
|
|
18319
|
-
type Event = Electron.Event;
|
|
18320
19044
|
type Extension = Electron.Extension;
|
|
18321
19045
|
type ExtensionInfo = Electron.ExtensionInfo;
|
|
18322
19046
|
type FileFilter = Electron.FileFilter;
|
|
@@ -18353,6 +19077,8 @@ declare namespace Electron {
|
|
|
18353
19077
|
type ProtocolResponseUploadData = Electron.ProtocolResponseUploadData;
|
|
18354
19078
|
type Rectangle = Electron.Rectangle;
|
|
18355
19079
|
type Referrer = Electron.Referrer;
|
|
19080
|
+
type ResolvedEndpoint = Electron.ResolvedEndpoint;
|
|
19081
|
+
type ResolvedHost = Electron.ResolvedHost;
|
|
18356
19082
|
type ScrubberItem = Electron.ScrubberItem;
|
|
18357
19083
|
type SegmentedControlSegment = Electron.SegmentedControlSegment;
|
|
18358
19084
|
type SerialPort = Electron.SerialPort;
|
|
@@ -18505,6 +19231,9 @@ declare namespace NodeJS {
|
|
|
18505
19231
|
* in Kilobytes.
|
|
18506
19232
|
*/
|
|
18507
19233
|
getHeapStatistics(): Electron.HeapStatistics;
|
|
19234
|
+
/**
|
|
19235
|
+
* @platform win32,linux
|
|
19236
|
+
*/
|
|
18508
19237
|
getIOCounters(): Electron.IOCounters;
|
|
18509
19238
|
/**
|
|
18510
19239
|
* Resolves with a ProcessMemoryInfo
|
|
@@ -18580,8 +19309,11 @@ declare namespace NodeJS {
|
|
|
18580
19309
|
*/
|
|
18581
19310
|
readonly contextIsolated: boolean;
|
|
18582
19311
|
/**
|
|
18583
|
-
* A `boolean`. When app is started by being passed as parameter to the default
|
|
18584
|
-
*
|
|
19312
|
+
* A `boolean`. When the app is started by being passed as parameter to the default
|
|
19313
|
+
* Electron executable, this property is `true` in the main process, otherwise it
|
|
19314
|
+
* is `undefined`. For example when running the app with `electron .`, it is
|
|
19315
|
+
* `true`, even if the app is packaged (`isPackaged`) is `true`. This can be useful
|
|
19316
|
+
* to determine how many arguments will need to be sliced off from `process.argv`.
|
|
18585
19317
|
*
|
|
18586
19318
|
*/
|
|
18587
19319
|
readonly defaultApp: boolean;
|