electron-types 43.5.1 → 43.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,11 +14,11 @@ The official `electron` package is ~200MB because it includes the Electron binar
14
14
  Since this package only provides TypeScript types, install it as a dev dependency. **Install the version that matches your Electron version** (see [Version Matching](#version-matching)):
15
15
 
16
16
  ```bash
17
- npm install -D electron-types@43.5.1
17
+ npm install -D electron-types@43.7.0
18
18
  # or
19
- yarn add -D electron-types@43.5.1
19
+ yarn add -D electron-types@43.7.0
20
20
  # or
21
- pnpm add -D electron-types@43.5.1
21
+ pnpm add -D electron-types@43.7.0
22
22
  ```
23
23
 
24
24
  ## Usage
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 43.5.1
1
+ // Type definitions for Electron 43.7.0
2
2
  // Project: http://electronjs.org/
3
3
  // Definitions by: The Electron Team <https://github.com/electron/electron>
4
4
  // Definitions: https://github.com/electron/typescript-definitions
@@ -1149,6 +1149,12 @@ declare namespace Electron {
1149
1149
  /**
1150
1150
  * Array of `ProcessMetric` objects that correspond to memory and CPU usage
1151
1151
  * statistics of all the processes associated with the app.
1152
+ *
1153
+ * > [!NOTE] `cpu.percentCPUUsage` and `cpu.idleWakeupsPerSecond` are averages over
1154
+ * the time since the last call to `app.getAppMetrics()`, and each call starts a
1155
+ * new measurement interval for every process at once. Other code in the main
1156
+ * process, including dependencies, shares those intervals. See `CPUUsage` for more
1157
+ * details.
1152
1158
  */
1153
1159
  getAppMetrics(): ProcessMetric[];
1154
1160
  /**
@@ -7377,12 +7383,14 @@ declare namespace Electron {
7377
7383
  */
7378
7384
  cumulativeCPUUsage?: number;
7379
7385
  /**
7380
- * The number of average idle CPU wakeups per second since the last call to
7381
- * getCPUUsage. First call returns 0. Will always return 0 on Windows.
7386
+ * The number of average idle CPU wakeups per second since the last call to the API
7387
+ * that returned this object. First call returns 0. Will always return 0 on
7388
+ * Windows.
7382
7389
  */
7383
7390
  idleWakeupsPerSecond: number;
7384
7391
  /**
7385
- * Percentage of CPU used since the last call to getCPUUsage. First call returns 0.
7392
+ * Percentage of CPU used since the last call to the API that returned this object.
7393
+ * First call returns 0.
7386
7394
  */
7387
7395
  percentCPUUsage: number;
7388
7396
  }
@@ -8231,6 +8239,14 @@ declare namespace Electron {
8231
8239
  * actual name of saved file will be different.
8232
8240
  */
8233
8241
  getFilename(): string;
8242
+ /**
8243
+ * The origin that started the download (for example `https://example.com`, or
8244
+ * `null` for an opaque origin), or an empty string if the download was not started
8245
+ * by web content (for example `webContents.downloadURL()`). Use this rather than
8246
+ * `getURL()` or the `webContents` to decide whose download it is: the URL is
8247
+ * chosen by the initiator and the `webContents` is the whole tab.
8248
+ */
8249
+ getInitiatorOrigin(): string;
8234
8250
  /**
8235
8251
  * Last-Modified header value.
8236
8252
  */
@@ -9599,6 +9615,15 @@ declare namespace Electron {
9599
9615
  * @platform darwin
9600
9616
  */
9601
9617
  accessibilityLabel: string;
9618
+ /**
9619
+ * A `MenuItemBadge` (optional) indicating the badge for the menu item.
9620
+ *
9621
+ * This property can be dynamically changed; setting it to `undefined` removes the
9622
+ * badge. Only available on macOS 14 and up.
9623
+ *
9624
+ * @platform darwin
9625
+ */
9626
+ badge?: MenuItemBadge;
9602
9627
  /**
9603
9628
  * A `boolean` indicating whether the item is checked.
9604
9629
  *
@@ -9726,6 +9751,27 @@ declare namespace Electron {
9726
9751
  visible: boolean;
9727
9752
  }
9728
9753
 
9754
+ interface MenuItemBadge {
9755
+
9756
+ // Docs: https://electronjs.org/docs/api/structures/menu-item-badge
9757
+
9758
+ /**
9759
+ * A custom string to display in the badge. Required for, and only usable with, the
9760
+ * `none` type.
9761
+ */
9762
+ content?: string;
9763
+ /**
9764
+ * The number of items the badge displays. Required for the `alerts`, `updates` and
9765
+ * `new-items` types; cannot be used with `none`.
9766
+ */
9767
+ count?: number;
9768
+ /**
9769
+ * Can be `alerts`, `updates`, `new-items` or `none`. Default is `none`. See
9770
+ * Creating badges of a specific type for further explanation of these types.
9771
+ */
9772
+ type?: ('alerts' | 'updates' | 'new-items' | 'none');
9773
+ }
9774
+
9729
9775
  class MessageChannelMain {
9730
9776
 
9731
9777
  // Docs: https://electronjs.org/docs/api/message-channel-main
@@ -11329,7 +11375,8 @@ declare namespace Electron {
11329
11375
  // Docs: https://electronjs.org/docs/api/structures/process-metric
11330
11376
 
11331
11377
  /**
11332
- * CPU usage of the process.
11378
+ * CPU usage of the process. Its `percentCPUUsage` and `idleWakeupsPerSecond` are
11379
+ * averages over the time since the previous call to the API returning this object.
11333
11380
  */
11334
11381
  cpu: CPUUsage;
11335
11382
  /**
@@ -11494,6 +11541,12 @@ declare namespace Electron {
11494
11541
  * Register a protocol handler for `scheme`. Requests made to URLs with this scheme
11495
11542
  * will delegate to this handler to determine what response should be sent.
11496
11543
  *
11544
+ * In addition to the standard `Request` fields, `request.initiatorOrigin` is set
11545
+ * to the origin that issued the request (for example `https://example.com`, or
11546
+ * `null` for an opaque origin) when web content made it; it is absent for requests
11547
+ * the browser started itself. Unlike `request.referrer` it is not controlled by
11548
+ * the requesting page, so prefer it when deciding whether to serve a request.
11549
+ *
11497
11550
  * Either a `Response` or a `Promise<Response>` can be returned.
11498
11551
  *
11499
11552
  * Example:
@@ -11698,6 +11751,12 @@ declare namespace Electron {
11698
11751
  // Docs: https://electronjs.org/docs/api/structures/protocol-request
11699
11752
 
11700
11753
  headers: Record<string, string>;
11754
+ /**
11755
+ * The origin that issued the request (for example `https://example.com`, or `null`
11756
+ * for an opaque origin). Absent for requests the browser started itself. Unlike
11757
+ * `referrer`, this is not controlled by the requesting page.
11758
+ */
11759
+ initiatorOrigin?: string;
11701
11760
  method: string;
11702
11761
  referrer: string;
11703
11762
  uploadData?: UploadData[];
@@ -12566,7 +12625,11 @@ declare namespace Electron {
12566
12625
  * True if the renderer is requesting that the connection include credentials (see
12567
12626
  * the spec for more details.)
12568
12627
  */
12569
- allowCredentials: boolean) => void): this;
12628
+ allowCredentials: boolean,
12629
+ /**
12630
+ * The frame that requested the preconnection, if it still exists.
12631
+ */
12632
+ frame: (WebFrameMain) | (null)) => void): this;
12570
12633
  off(event: 'preconnect', listener: (event: Event,
12571
12634
  /**
12572
12635
  * The URL being requested for preconnection by the renderer.
@@ -12576,7 +12639,11 @@ declare namespace Electron {
12576
12639
  * True if the renderer is requesting that the connection include credentials (see
12577
12640
  * the spec for more details.)
12578
12641
  */
12579
- allowCredentials: boolean) => void): this;
12642
+ allowCredentials: boolean,
12643
+ /**
12644
+ * The frame that requested the preconnection, if it still exists.
12645
+ */
12646
+ frame: (WebFrameMain) | (null)) => void): this;
12580
12647
  once(event: 'preconnect', listener: (event: Event,
12581
12648
  /**
12582
12649
  * The URL being requested for preconnection by the renderer.
@@ -12586,7 +12653,11 @@ declare namespace Electron {
12586
12653
  * True if the renderer is requesting that the connection include credentials (see
12587
12654
  * the spec for more details.)
12588
12655
  */
12589
- allowCredentials: boolean) => void): this;
12656
+ allowCredentials: boolean,
12657
+ /**
12658
+ * The frame that requested the preconnection, if it still exists.
12659
+ */
12660
+ frame: (WebFrameMain) | (null)) => void): this;
12590
12661
  addListener(event: 'preconnect', listener: (event: Event,
12591
12662
  /**
12592
12663
  * The URL being requested for preconnection by the renderer.
@@ -12596,7 +12667,11 @@ declare namespace Electron {
12596
12667
  * True if the renderer is requesting that the connection include credentials (see
12597
12668
  * the spec for more details.)
12598
12669
  */
12599
- allowCredentials: boolean) => void): this;
12670
+ allowCredentials: boolean,
12671
+ /**
12672
+ * The frame that requested the preconnection, if it still exists.
12673
+ */
12674
+ frame: (WebFrameMain) | (null)) => void): this;
12600
12675
  removeListener(event: 'preconnect', listener: (event: Event,
12601
12676
  /**
12602
12677
  * The URL being requested for preconnection by the renderer.
@@ -12606,7 +12681,11 @@ declare namespace Electron {
12606
12681
  * True if the renderer is requesting that the connection include credentials (see
12607
12682
  * the spec for more details.)
12608
12683
  */
12609
- allowCredentials: boolean) => void): this;
12684
+ allowCredentials: boolean,
12685
+ /**
12686
+ * The frame that requested the preconnection, if it still exists.
12687
+ */
12688
+ frame: (WebFrameMain) | (null)) => void): this;
12610
12689
  /**
12611
12690
  * Emitted when a HID device needs to be selected when a call to
12612
12691
  * `navigator.hid.requestDevice` is made. `callback` should be called with
@@ -12944,26 +13023,47 @@ declare namespace Electron {
12944
13023
  removeListener(event: 'usb-device-revoked', listener: (event: Event,
12945
13024
  details: UsbDeviceRevokedDetails) => void): this;
12946
13025
  /**
12947
- * Emitted when Electron is about to download `item` in `webContents`.
13026
+ * Emitted when Electron is about to download `item` in `webContents`. See also
13027
+ * `item.getInitiatorOrigin()`.
12948
13028
  *
12949
13029
  * Calling `event.preventDefault()` will cancel the download and `item` will not be
12950
13030
  * available from next tick of the process.
12951
13031
  */
12952
13032
  on(event: 'will-download', listener: (event: Event,
12953
13033
  item: DownloadItem,
12954
- webContents: WebContents) => void): this;
13034
+ webContents: WebContents,
13035
+ /**
13036
+ * The frame that started the download, if it still exists.
13037
+ */
13038
+ frame: (WebFrameMain) | (null)) => void): this;
12955
13039
  off(event: 'will-download', listener: (event: Event,
12956
13040
  item: DownloadItem,
12957
- webContents: WebContents) => void): this;
13041
+ webContents: WebContents,
13042
+ /**
13043
+ * The frame that started the download, if it still exists.
13044
+ */
13045
+ frame: (WebFrameMain) | (null)) => void): this;
12958
13046
  once(event: 'will-download', listener: (event: Event,
12959
13047
  item: DownloadItem,
12960
- webContents: WebContents) => void): this;
13048
+ webContents: WebContents,
13049
+ /**
13050
+ * The frame that started the download, if it still exists.
13051
+ */
13052
+ frame: (WebFrameMain) | (null)) => void): this;
12961
13053
  addListener(event: 'will-download', listener: (event: Event,
12962
13054
  item: DownloadItem,
12963
- webContents: WebContents) => void): this;
13055
+ webContents: WebContents,
13056
+ /**
13057
+ * The frame that started the download, if it still exists.
13058
+ */
13059
+ frame: (WebFrameMain) | (null)) => void): this;
12964
13060
  removeListener(event: 'will-download', listener: (event: Event,
12965
13061
  item: DownloadItem,
12966
- webContents: WebContents) => void): this;
13062
+ webContents: WebContents,
13063
+ /**
13064
+ * The frame that started the download, if it still exists.
13065
+ */
13066
+ frame: (WebFrameMain) | (null)) => void): this;
12967
13067
  /**
12968
13068
  * Whether the word was successfully written to the custom dictionary. This API
12969
13069
  * will not work on non-persistent (in-memory) sessions.
@@ -13334,8 +13434,12 @@ declare namespace Electron {
13334
13434
  * is available and `useSystemPicker` is set to `true`, the handler will not be
13335
13435
  * invoked.
13336
13436
  *
13337
- * Passing a WebFrameMain object as a video or audio stream will capture the video
13338
- * or audio stream from that frame.
13437
+ * Passing a WebFrameMain object as a video or audio stream captures the whole
13438
+ * `webContents` that contains that frame (the tab), not just the frame:
13439
+ * `request.frame` from an `<iframe>` therefore grants that iframe a capture of the
13440
+ * page that embeds it. Check `request.frame` before using it this way, and note
13441
+ * that the callback throws if the frame has been destroyed by the time it is
13442
+ * called.
13339
13443
  *
13340
13444
  * Passing `null` instead of a function resets the handler to its default state.
13341
13445
  */
@@ -18110,7 +18214,9 @@ declare namespace Electron {
18110
18214
  * The identifier of a WebContents stream. This identifier can be used with
18111
18215
  * `navigator.mediaDevices.getUserMedia` using a `chromeMediaSource` of `tab`. The
18112
18216
  * identifier is restricted to the web contents that it is registered to and is
18113
- * only valid for 10 seconds.
18217
+ * only valid for 10 seconds. The `desktop` source only accepts screen and window
18218
+ * identifiers from `desktopCapturer.getSources`; to capture a WebContents use this
18219
+ * identifier with the `tab` source, or `ses.setDisplayMediaRequestHandler`.
18114
18220
  */
18115
18221
  getMediaSourceId(requestWebContents: WebContents): string;
18116
18222
  /**
@@ -18250,6 +18356,10 @@ declare namespace Electron {
18250
18356
  * greater than 0.
18251
18357
  */
18252
18358
  isBeingCaptured(): boolean;
18359
+ /**
18360
+ * Whether caret browsing is enabled for this page.
18361
+ */
18362
+ isCaretBrowsingEnabled(): boolean;
18253
18363
  /**
18254
18364
  * Whether the renderer process has crashed.
18255
18365
  */
@@ -18485,6 +18595,10 @@ declare namespace Electron {
18485
18595
  * when the page becomes backgrounded. This also affects the Page Visibility API.
18486
18596
  */
18487
18597
  setBackgroundThrottling(allowed: boolean): void;
18598
+ /**
18599
+ * Sets whether caret browsing is enabled on the current web page.
18600
+ */
18601
+ setCaretBrowsingEnabled(enabled: boolean): void;
18488
18602
  /**
18489
18603
  * Changes the title of the DevTools window to `title`. This will only be visible
18490
18604
  * if DevTools is opened in `undocked` or `detach` mode.
@@ -18634,6 +18748,25 @@ declare namespace Electron {
18634
18748
  * affects the Page Visibility API.
18635
18749
  */
18636
18750
  backgroundThrottling: boolean;
18751
+ /**
18752
+ * A `boolean` property that determines whether caret browsing is enabled for this
18753
+ * page.
18754
+ *
18755
+ * When enabled, a movable cursor is placed in the page's text, allowing the user
18756
+ * to navigate and select content with the keyboard. Changes apply to the live page
18757
+ * without reloading it.
18758
+ *
18759
+ * A `<webview>` guest inherits this value from its embedder when it is created and
18760
+ * then tracks it independently, so disabling caret browsing on the embedder leaves
18761
+ * an existing guest enabled.
18762
+ *
18763
+ * While any `WebContents` in the process has caret browsing enabled, assistive
18764
+ * technology is notified process-wide that caret browsing is active, so that
18765
+ * screen readers report the caret's position as it moves. That notification is
18766
+ * only withdrawn once every `WebContents` that enabled caret browsing has either
18767
+ * disabled it or been destroyed.
18768
+ */
18769
+ caretBrowsingEnabled: boolean;
18637
18770
  /**
18638
18771
  * A `Debugger` instance for this webContents.
18639
18772
  *
@@ -19353,8 +19486,10 @@ declare namespace Electron {
19353
19486
  */
19354
19487
  nodeIntegrationInSubFrames?: boolean;
19355
19488
  /**
19356
- * Whether node integration is enabled in web workers. Default is `false`. More
19357
- * about this can be found in Multithreading.
19489
+ * Whether node integration is enabled in web workers. Default is `false`. Only
19490
+ * workers created by a frame that itself has access to Node.js (the main frame, or
19491
+ * any frame when `nodeIntegrationInSubFrames` is enabled) get it. More about this
19492
+ * can be found in Multithreading.
19358
19493
  */
19359
19494
  nodeIntegrationInWorker?: boolean;
19360
19495
  /**
@@ -19919,6 +20054,10 @@ declare namespace Electron {
19919
20054
  removeEventListener(event: 'close', listener: (event: DOMEvent) => void): this;
19920
20055
  /**
19921
20056
  * Fired when the guest page has sent an asynchronous message to embedder page.
20057
+ * `frameId` does not tell the embedder which document sent the message; when that
20058
+ * matters, have the guest use `ipcRenderer.send()` and handle the guest
20059
+ * `webContents`' `ipc-message` event in the main process, where
20060
+ * `event.senderFrame` identifies the sender.
19922
20061
  *
19923
20062
  * With `sendToHost` method and `ipc-message` event you can communicate between
19924
20063
  * guest page and embedder page:
@@ -20301,7 +20440,9 @@ declare namespace Electron {
20301
20440
  unselect(): void;
20302
20441
  /**
20303
20442
  * A `boolean`. When this attribute is present the guest page will be allowed to
20304
- * open new windows. Popups are disabled by default.
20443
+ * open new windows, whether through `window.open()` or a link opened into a new
20444
+ * window (for example a modifier-clicked or `target="_blank"` link). Popups are
20445
+ * disabled by default.
20305
20446
  */
20306
20447
  allowpopups: boolean;
20307
20448
  /**
@@ -21739,6 +21880,15 @@ declare namespace Electron {
21739
21880
  * The blocked path attempting to be accessed.
21740
21881
  */
21741
21882
  path: string;
21883
+ /**
21884
+ * The frame that initiated access. May be `null` if the frame has since been
21885
+ * destroyed.
21886
+ */
21887
+ frame: (WebFrameMain) | (null);
21888
+ /**
21889
+ * The WebContents that contains `frame`.
21890
+ */
21891
+ webContents: (WebContents) | (null);
21742
21892
  }
21743
21893
 
21744
21894
  interface FindInPageOptions {
@@ -22347,6 +22497,13 @@ declare namespace Electron {
22347
22497
  * containing group after the containing group of the item with the specified id.
22348
22498
  */
22349
22499
  afterGroupContaining?: string[];
22500
+ /**
22501
+ * A badge shown alongside the label, either a system-styled count (`alerts`,
22502
+ * `updates`, `new-items`) or a custom string. Only available on macOS 14 and up.
22503
+ *
22504
+ * @platform darwin
22505
+ */
22506
+ badge?: MenuItemBadge;
22350
22507
  }
22351
22508
 
22352
22509
  interface MessageBoxOptions {
@@ -22738,6 +22895,12 @@ declare namespace Electron {
22738
22895
  * or been destroyed.
22739
22896
  */
22740
22897
  frame?: (WebFrameMain) | (null);
22898
+ /**
22899
+ * The origin that issued the request (for example `https://example.com`, or `null`
22900
+ * for an opaque origin). Kept from the original request across redirects; absent
22901
+ * for requests the browser started itself.
22902
+ */
22903
+ initiatorOrigin?: string;
22741
22904
  /**
22742
22905
  * Can be `mainFrame`, `subFrame`, `stylesheet`, `script`, `image`, `font`,
22743
22906
  * `object`, `xhr`, `ping`, `cspReport`, `media`, `webSocket` or `other`.
@@ -22767,6 +22930,12 @@ declare namespace Electron {
22767
22930
  * or been destroyed.
22768
22931
  */
22769
22932
  frame?: (WebFrameMain) | (null);
22933
+ /**
22934
+ * The origin that issued the request (for example `https://example.com`, or `null`
22935
+ * for an opaque origin). Kept from the original request across redirects; absent
22936
+ * for requests the browser started itself.
22937
+ */
22938
+ initiatorOrigin?: string;
22770
22939
  /**
22771
22940
  * Can be `mainFrame`, `subFrame`, `stylesheet`, `script`, `image`, `font`,
22772
22941
  * `object`, `xhr`, `ping`, `cspReport`, `media`, `webSocket` or `other`.
@@ -22788,6 +22957,12 @@ declare namespace Electron {
22788
22957
  * or been destroyed.
22789
22958
  */
22790
22959
  frame?: (WebFrameMain) | (null);
22960
+ /**
22961
+ * The origin that issued the request (for example `https://example.com`, or `null`
22962
+ * for an opaque origin). Kept from the original request across redirects; absent
22963
+ * for requests the browser started itself.
22964
+ */
22965
+ initiatorOrigin?: string;
22791
22966
  /**
22792
22967
  * Can be `mainFrame`, `subFrame`, `stylesheet`, `script`, `image`, `font`,
22793
22968
  * `object`, `xhr`, `ping`, `cspReport`, `media`, `webSocket` or `other`.
@@ -22810,6 +22985,12 @@ declare namespace Electron {
22810
22985
  * or been destroyed.
22811
22986
  */
22812
22987
  frame?: (WebFrameMain) | (null);
22988
+ /**
22989
+ * The origin that issued the request (for example `https://example.com`, or `null`
22990
+ * for an opaque origin). Kept from the original request across redirects; absent
22991
+ * for requests the browser started itself.
22992
+ */
22993
+ initiatorOrigin?: string;
22813
22994
  /**
22814
22995
  * Can be `mainFrame`, `subFrame`, `stylesheet`, `script`, `image`, `font`,
22815
22996
  * `object`, `xhr`, `ping`, `cspReport`, `media`, `webSocket` or `other`.
@@ -22835,6 +23016,12 @@ declare namespace Electron {
22835
23016
  * or been destroyed.
22836
23017
  */
22837
23018
  frame?: (WebFrameMain) | (null);
23019
+ /**
23020
+ * The origin that issued the request (for example `https://example.com`, or `null`
23021
+ * for an opaque origin). Kept from the original request across redirects; absent
23022
+ * for requests the browser started itself.
23023
+ */
23024
+ initiatorOrigin?: string;
22838
23025
  /**
22839
23026
  * Can be `mainFrame`, `subFrame`, `stylesheet`, `script`, `image`, `font`,
22840
23027
  * `object`, `xhr`, `ping`, `cspReport`, `media`, `webSocket` or `other`.
@@ -22860,6 +23047,12 @@ declare namespace Electron {
22860
23047
  * or been destroyed.
22861
23048
  */
22862
23049
  frame?: (WebFrameMain) | (null);
23050
+ /**
23051
+ * The origin that issued the request (for example `https://example.com`, or `null`
23052
+ * for an opaque origin). Kept from the original request across redirects; absent
23053
+ * for requests the browser started itself.
23054
+ */
23055
+ initiatorOrigin?: string;
22863
23056
  /**
22864
23057
  * Can be `mainFrame`, `subFrame`, `stylesheet`, `script`, `image`, `font`,
22865
23058
  * `object`, `xhr`, `ping`, `cspReport`, `media`, `webSocket` or `other`.
@@ -22883,6 +23076,12 @@ declare namespace Electron {
22883
23076
  * or been destroyed.
22884
23077
  */
22885
23078
  frame?: (WebFrameMain) | (null);
23079
+ /**
23080
+ * The origin that issued the request (for example `https://example.com`, or `null`
23081
+ * for an opaque origin). Kept from the original request across redirects; absent
23082
+ * for requests the browser started itself.
23083
+ */
23084
+ initiatorOrigin?: string;
22886
23085
  /**
22887
23086
  * Can be `mainFrame`, `subFrame`, `stylesheet`, `script`, `image`, `font`,
22888
23087
  * `object`, `xhr`, `ping`, `cspReport`, `media`, `webSocket` or `other`.
@@ -22910,6 +23109,12 @@ declare namespace Electron {
22910
23109
  * or been destroyed.
22911
23110
  */
22912
23111
  frame?: (WebFrameMain) | (null);
23112
+ /**
23113
+ * The origin that issued the request (for example `https://example.com`, or `null`
23114
+ * for an opaque origin). Kept from the original request across redirects; absent
23115
+ * for requests the browser started itself.
23116
+ */
23117
+ initiatorOrigin?: string;
22913
23118
  /**
22914
23119
  * Can be `mainFrame`, `subFrame`, `stylesheet`, `script`, `image`, `font`,
22915
23120
  * `object`, `xhr`, `ping`, `cspReport`, `media`, `webSocket` or `other`.
@@ -23128,7 +23333,8 @@ declare namespace Electron {
23128
23333
  */
23129
23334
  embeddingOrigin?: string;
23130
23335
  /**
23131
- * The security origin of the `media` check.
23336
+ * The origin of the requesting frame, for `media`, `hid`, `usb` and `serial`
23337
+ * checks.
23132
23338
  */
23133
23339
  securityOrigin?: string;
23134
23340
  /**
@@ -23136,8 +23342,8 @@ declare namespace Electron {
23136
23342
  */
23137
23343
  mediaType?: ('video' | 'audio' | 'unknown');
23138
23344
  /**
23139
- * The last URL the requesting frame loaded. This is not provided for cross-origin
23140
- * sub frames making permission checks.
23345
+ * The last URL the requesting frame loaded. Not provided when the check is not
23346
+ * made on behalf of a document (for example for a service worker).
23141
23347
  */
23142
23348
  requestingUrl?: string;
23143
23349
  /**
@@ -23749,7 +23955,8 @@ declare namespace Electron {
23749
23955
  /**
23750
23956
  * If a string is specified, can be `loopback` or `loopbackWithMute`. Specifying a
23751
23957
  * loopback device will capture system audio, and is currently only supported on
23752
- * Windows. If a WebFrameMain is specified, will capture audio from that frame.
23958
+ * Windows. If a WebFrameMain is specified, will capture audio from the
23959
+ * `webContents` that contains that frame.
23753
23960
  */
23754
23961
  audio?: (('loopback' | 'loopbackWithMute')) | (WebFrameMain);
23755
23962
  /**
@@ -25298,6 +25505,7 @@ declare namespace Electron {
25298
25505
  type MediaAccessPermissionRequest = Electron.MediaAccessPermissionRequest;
25299
25506
  type MemoryInfo = Electron.MemoryInfo;
25300
25507
  type MemoryUsageDetails = Electron.MemoryUsageDetails;
25508
+ type MenuItemBadge = Electron.MenuItemBadge;
25301
25509
  type MimeTypedBuffer = Electron.MimeTypedBuffer;
25302
25510
  type MouseInputEvent = Electron.MouseInputEvent;
25303
25511
  type MouseWheelInputEvent = Electron.MouseWheelInputEvent;
@@ -25707,6 +25915,7 @@ declare namespace Electron {
25707
25915
  type MediaAccessPermissionRequest = Electron.MediaAccessPermissionRequest;
25708
25916
  type MemoryInfo = Electron.MemoryInfo;
25709
25917
  type MemoryUsageDetails = Electron.MemoryUsageDetails;
25918
+ type MenuItemBadge = Electron.MenuItemBadge;
25710
25919
  type MimeTypedBuffer = Electron.MimeTypedBuffer;
25711
25920
  type MouseInputEvent = Electron.MouseInputEvent;
25712
25921
  type MouseWheelInputEvent = Electron.MouseWheelInputEvent;
@@ -26043,6 +26252,7 @@ declare namespace Electron {
26043
26252
  type MediaAccessPermissionRequest = Electron.MediaAccessPermissionRequest;
26044
26253
  type MemoryInfo = Electron.MemoryInfo;
26045
26254
  type MemoryUsageDetails = Electron.MemoryUsageDetails;
26255
+ type MenuItemBadge = Electron.MenuItemBadge;
26046
26256
  type MimeTypedBuffer = Electron.MimeTypedBuffer;
26047
26257
  type MouseInputEvent = Electron.MouseInputEvent;
26048
26258
  type MouseWheelInputEvent = Electron.MouseWheelInputEvent;
@@ -26378,6 +26588,7 @@ declare namespace Electron {
26378
26588
  type MediaAccessPermissionRequest = Electron.MediaAccessPermissionRequest;
26379
26589
  type MemoryInfo = Electron.MemoryInfo;
26380
26590
  type MemoryUsageDetails = Electron.MemoryUsageDetails;
26591
+ type MenuItemBadge = Electron.MenuItemBadge;
26381
26592
  type MimeTypedBuffer = Electron.MimeTypedBuffer;
26382
26593
  type MouseInputEvent = Electron.MouseInputEvent;
26383
26594
  type MouseWheelInputEvent = Electron.MouseWheelInputEvent;
@@ -26808,6 +27019,7 @@ declare namespace Electron {
26808
27019
  type MediaAccessPermissionRequest = Electron.MediaAccessPermissionRequest;
26809
27020
  type MemoryInfo = Electron.MemoryInfo;
26810
27021
  type MemoryUsageDetails = Electron.MemoryUsageDetails;
27022
+ type MenuItemBadge = Electron.MenuItemBadge;
26811
27023
  type MimeTypedBuffer = Electron.MimeTypedBuffer;
26812
27024
  type MouseInputEvent = Electron.MouseInputEvent;
26813
27025
  type MouseWheelInputEvent = Electron.MouseWheelInputEvent;
@@ -26993,6 +27205,14 @@ declare namespace NodeJS {
26993
27205
  * Kilobytes.
26994
27206
  */
26995
27207
  getBlinkMemoryInfo(): Electron.BlinkMemoryInfo;
27208
+ /**
27209
+ * CPU usage of the process this is called in.
27210
+ *
27211
+ * > [!NOTE] `percentCPUUsage` and `idleWakeupsPerSecond` are averages over the
27212
+ * time since the previous call to `process.getCPUUsage()` in this process, and
27213
+ * each call starts a new measurement interval. Every caller in the process shares
27214
+ * that interval. See `CPUUsage` for details.
27215
+ */
26996
27216
  getCPUUsage(): Electron.CPUUsage;
26997
27217
  /**
26998
27218
  * The number of milliseconds since epoch, or `null` if the information is
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "electronVersion": "43.5.1",
3
- "extractedAt": "2026-09-01T18:16:57.360Z"
2
+ "electronVersion": "43.7.0",
3
+ "extractedAt": "2026-09-10T14:12:55.278Z"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-types",
3
- "version": "43.5.1",
3
+ "version": "43.7.0",
4
4
  "type": "module",
5
5
  "description": "TypeScript type definitions extracted from the electron package",
6
6
  "types": "./dist/electron.d.ts",