electron 12.0.2 → 12.0.6
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/electron.d.ts +15 -18
- package/package.json +1 -1
package/electron.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Electron 12.0.
|
|
1
|
+
// Type definitions for Electron 12.0.6
|
|
2
2
|
// Project: http://electronjs.org/
|
|
3
3
|
// Definitions by: The Electron Team <https://github.com/electron/electron>
|
|
4
4
|
// Definitions: https://github.com/electron/electron-typescript-definitions
|
|
@@ -936,7 +936,8 @@ You should seek to use the `steal` option as sparingly as possible.
|
|
|
936
936
|
*/
|
|
937
937
|
getJumpListSettings(): JumpListSettings;
|
|
938
938
|
/**
|
|
939
|
-
* The current application locale
|
|
939
|
+
* The current application locale, fetched using Chromium's `l10n_util` library.
|
|
940
|
+
* Possible return values are documented here.
|
|
940
941
|
*
|
|
941
942
|
* To set the locale, you'll want to use a command line switch at app startup,
|
|
942
943
|
* which may be found here.
|
|
@@ -1321,6 +1322,10 @@ By default this API will return `false`.
|
|
|
1321
1322
|
* removed item to a custom category earlier than that will result in the entire
|
|
1322
1323
|
* custom category being omitted from the Jump List. The list of removed items can
|
|
1323
1324
|
* be obtained using `app.getJumpListSettings()`.
|
|
1325
|
+
*
|
|
1326
|
+
* **Note:** The maximum length of a Jump List item's `description` property is 260
|
|
1327
|
+
* characters. Beyond this limit, the item will not be added to the Jump List, nor
|
|
1328
|
+
* will it be displayed.
|
|
1324
1329
|
*
|
|
1325
1330
|
Here's a very simple example of creating a custom Jump List:
|
|
1326
1331
|
*
|
|
@@ -2298,7 +2303,7 @@ Calling `event.preventDefault()` will prevent the menu from being displayed.
|
|
|
2298
2303
|
getMaximumSize(): number[];
|
|
2299
2304
|
/**
|
|
2300
2305
|
* Window id in the format of DesktopCapturerSource's id. For example
|
|
2301
|
-
* "window:
|
|
2306
|
+
* "window:1324:0".
|
|
2302
2307
|
*
|
|
2303
2308
|
* More precisely the format is `window:id:other_id` where `id` is `HWND` on
|
|
2304
2309
|
* Windows, `CGWindowID` (`uint64_t`) on macOS and `Window` (`unsigned long`) on
|
|
@@ -5161,7 +5166,7 @@ Retrieves the product descriptions.
|
|
|
5161
5166
|
args?: string;
|
|
5162
5167
|
/**
|
|
5163
5168
|
* Description of the task (displayed in a tooltip). Should only be set if `type`
|
|
5164
|
-
* is `task`.
|
|
5169
|
+
* is `task`. Maximum length 260 characters.
|
|
5165
5170
|
*/
|
|
5166
5171
|
description?: string;
|
|
5167
5172
|
/**
|
|
@@ -8020,13 +8025,15 @@ Some popular `key` and `type`s are:
|
|
|
8020
8025
|
*/
|
|
8021
8026
|
subscribeNotification(event: string, callback: (event: string, userInfo: Record<string, unknown>, object: string) => void): number;
|
|
8022
8027
|
/**
|
|
8028
|
+
* The ID of this subscription
|
|
8029
|
+
*
|
|
8023
8030
|
* Same as `subscribeNotification`, but uses
|
|
8024
8031
|
* `NSWorkspace.sharedWorkspace.notificationCenter`. This is necessary for events
|
|
8025
8032
|
* such as `NSWorkspaceDidActivateApplicationNotification`.
|
|
8026
8033
|
*
|
|
8027
8034
|
* @platform darwin
|
|
8028
8035
|
*/
|
|
8029
|
-
subscribeWorkspaceNotification(event: string, callback: (event: string, userInfo: Record<string, unknown>, object: string) => void):
|
|
8036
|
+
subscribeWorkspaceNotification(event: string, callback: (event: string, userInfo: Record<string, unknown>, object: string) => void): number;
|
|
8030
8037
|
/**
|
|
8031
8038
|
* Same as `unsubscribeNotification`, but removes the subscriber from
|
|
8032
8039
|
* `NSNotificationCenter`.
|
|
@@ -8869,7 +8876,7 @@ This value is set to false by default.
|
|
|
8869
8876
|
/**
|
|
8870
8877
|
* `file`.
|
|
8871
8878
|
*/
|
|
8872
|
-
type:
|
|
8879
|
+
type: 'file';
|
|
8873
8880
|
}
|
|
8874
8881
|
|
|
8875
8882
|
interface UploadRawData {
|
|
@@ -8883,7 +8890,7 @@ This value is set to false by default.
|
|
|
8883
8890
|
/**
|
|
8884
8891
|
* `rawData`.
|
|
8885
8892
|
*/
|
|
8886
|
-
type:
|
|
8893
|
+
type: 'rawData';
|
|
8887
8894
|
}
|
|
8888
8895
|
|
|
8889
8896
|
class WebContents extends NodeEventEmitter {
|
|
@@ -12804,14 +12811,7 @@ See webContents.sendInputEvent for detailed description of `event` object.
|
|
|
12804
12811
|
*/
|
|
12805
12812
|
frameName: string;
|
|
12806
12813
|
/**
|
|
12807
|
-
* Comma separated list of window features provided to `window.open()`.
|
|
12808
|
-
* `{action: 'deny'} | {action: 'allow', overrideBrowserWindowOptions?:
|
|
12809
|
-
* BrowserWindowConstructorOptions}` - `deny` cancels the creation of the new
|
|
12810
|
-
* window. `allow` will allow the new window to be created. Specifying
|
|
12811
|
-
* `overrideBrowserWindowOptions` allows customization of the created window.
|
|
12812
|
-
* Returning an unrecognized value such as a null, undefined, or an object without
|
|
12813
|
-
* a recognized 'action' value will result in a console error and have the same
|
|
12814
|
-
* effect as returning `{action: 'deny'}`.
|
|
12814
|
+
* Comma separated list of window features provided to `window.open()`.
|
|
12815
12815
|
*/
|
|
12816
12816
|
features: string;
|
|
12817
12817
|
}
|
|
@@ -15859,9 +15859,6 @@ declare namespace NodeJS {
|
|
|
15859
15859
|
/**
|
|
15860
15860
|
* Emitted when Electron has loaded its internal initialization script and is
|
|
15861
15861
|
* beginning to load the web page or the main script.
|
|
15862
|
-
*
|
|
15863
|
-
* It can be used by the preload script to add removed Node global symbols back to
|
|
15864
|
-
* the global scope when node integration is turned off:
|
|
15865
15862
|
*/
|
|
15866
15863
|
on(event: 'loaded', listener: Function): this;
|
|
15867
15864
|
once(event: 'loaded', listener: Function): this;
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"node": ">= 8.6"
|
|
17
17
|
},
|
|
18
18
|
"name": "electron",
|
|
19
|
-
"version": "12.0.
|
|
19
|
+
"version": "12.0.6",
|
|
20
20
|
"repository": "https://github.com/electron/electron",
|
|
21
21
|
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
|
|
22
22
|
"license": "MIT",
|