electron 27.0.0-beta.9 → 28.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.
Files changed (3) hide show
  1. package/checksums.json +75 -75
  2. package/electron.d.ts +861 -118
  3. package/package.json +1 -1
package/electron.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 27.0.0-beta.9
1
+ // Type definitions for Electron 28.0.0-alpha.1
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
@@ -35,6 +35,11 @@ declare namespace Electron {
35
35
  * `true` when Chrome's accessibility support is enabled, `false` otherwise.
36
36
  */
37
37
  accessibilitySupportEnabled: boolean) => void): this;
38
+ off(event: 'accessibility-support-changed', listener: (event: Event,
39
+ /**
40
+ * `true` when Chrome's accessibility support is enabled, `false` otherwise.
41
+ */
42
+ accessibilitySupportEnabled: boolean) => void): this;
38
43
  once(event: 'accessibility-support-changed', listener: (event: Event,
39
44
  /**
40
45
  * `true` when Chrome's accessibility support is enabled, `false` otherwise.
@@ -60,6 +65,8 @@ declare namespace Electron {
60
65
  */
61
66
  on(event: 'activate', listener: (event: Event,
62
67
  hasVisibleWindows: boolean) => void): this;
68
+ off(event: 'activate', listener: (event: Event,
69
+ hasVisibleWindows: boolean) => void): this;
63
70
  once(event: 'activate', listener: (event: Event,
64
71
  hasVisibleWindows: boolean) => void): this;
65
72
  addListener(event: 'activate', listener: (event: Event,
@@ -81,6 +88,15 @@ declare namespace Electron {
81
88
  * Contains app-specific state stored by the activity.
82
89
  */
83
90
  userInfo: unknown) => void): this;
91
+ off(event: 'activity-was-continued', listener: (event: Event,
92
+ /**
93
+ * A string identifying the activity. Maps to `NSUserActivity.activityType`.
94
+ */
95
+ type: string,
96
+ /**
97
+ * Contains app-specific state stored by the activity.
98
+ */
99
+ userInfo: unknown) => void): this;
84
100
  once(event: 'activity-was-continued', listener: (event: Event,
85
101
  /**
86
102
  * A string identifying the activity. Maps to `NSUserActivity.activityType`.
@@ -121,6 +137,7 @@ declare namespace Electron {
121
137
  * a shutdown/restart of the system or a user logout.
122
138
  */
123
139
  on(event: 'before-quit', listener: (event: Event) => void): this;
140
+ off(event: 'before-quit', listener: (event: Event) => void): this;
124
141
  once(event: 'before-quit', listener: (event: Event) => void): this;
125
142
  addListener(event: 'before-quit', listener: (event: Event) => void): this;
126
143
  removeListener(event: 'before-quit', listener: (event: Event) => void): this;
@@ -129,6 +146,8 @@ declare namespace Electron {
129
146
  */
130
147
  on(event: 'browser-window-blur', listener: (event: Event,
131
148
  window: BrowserWindow) => void): this;
149
+ off(event: 'browser-window-blur', listener: (event: Event,
150
+ window: BrowserWindow) => void): this;
132
151
  once(event: 'browser-window-blur', listener: (event: Event,
133
152
  window: BrowserWindow) => void): this;
134
153
  addListener(event: 'browser-window-blur', listener: (event: Event,
@@ -140,6 +159,8 @@ declare namespace Electron {
140
159
  */
141
160
  on(event: 'browser-window-created', listener: (event: Event,
142
161
  window: BrowserWindow) => void): this;
162
+ off(event: 'browser-window-created', listener: (event: Event,
163
+ window: BrowserWindow) => void): this;
143
164
  once(event: 'browser-window-created', listener: (event: Event,
144
165
  window: BrowserWindow) => void): this;
145
166
  addListener(event: 'browser-window-created', listener: (event: Event,
@@ -151,6 +172,8 @@ declare namespace Electron {
151
172
  */
152
173
  on(event: 'browser-window-focus', listener: (event: Event,
153
174
  window: BrowserWindow) => void): this;
175
+ off(event: 'browser-window-focus', listener: (event: Event,
176
+ window: BrowserWindow) => void): this;
154
177
  once(event: 'browser-window-focus', listener: (event: Event,
155
178
  window: BrowserWindow) => void): this;
156
179
  addListener(event: 'browser-window-focus', listener: (event: Event,
@@ -172,6 +195,16 @@ declare namespace Electron {
172
195
  certificate: Certificate,
173
196
  callback: (isTrusted: boolean) => void,
174
197
  isMainFrame: boolean) => void): this;
198
+ off(event: 'certificate-error', listener: (event: Event,
199
+ webContents: WebContents,
200
+ url: string,
201
+ /**
202
+ * The error code
203
+ */
204
+ error: string,
205
+ certificate: Certificate,
206
+ callback: (isTrusted: boolean) => void,
207
+ isMainFrame: boolean) => void): this;
175
208
  once(event: 'certificate-error', listener: (event: Event,
176
209
  webContents: WebContents,
177
210
  url: string,
@@ -208,6 +241,8 @@ declare namespace Electron {
208
241
  */
209
242
  on(event: 'child-process-gone', listener: (event: Event,
210
243
  details: Details) => void): this;
244
+ off(event: 'child-process-gone', listener: (event: Event,
245
+ details: Details) => void): this;
211
246
  once(event: 'child-process-gone', listener: (event: Event,
212
247
  details: Details) => void): this;
213
248
  addListener(event: 'child-process-gone', listener: (event: Event,
@@ -236,6 +271,16 @@ declare namespace Electron {
236
271
  */
237
272
  userInfo: unknown,
238
273
  details: ContinueActivityDetails) => void): this;
274
+ off(event: 'continue-activity', listener: (event: Event,
275
+ /**
276
+ * A string identifying the activity. Maps to `NSUserActivity.activityType`.
277
+ */
278
+ type: string,
279
+ /**
280
+ * Contains app-specific state stored by the activity on another device.
281
+ */
282
+ userInfo: unknown,
283
+ details: ContinueActivityDetails) => void): this;
239
284
  once(event: 'continue-activity', listener: (event: Event,
240
285
  /**
241
286
  * A string identifying the activity. Maps to `NSUserActivity.activityType`.
@@ -281,6 +326,15 @@ declare namespace Electron {
281
326
  * A string with the error's localized description.
282
327
  */
283
328
  error: string) => void): this;
329
+ off(event: 'continue-activity-error', listener: (event: Event,
330
+ /**
331
+ * A string identifying the activity. Maps to `NSUserActivity.activityType`.
332
+ */
333
+ type: string,
334
+ /**
335
+ * A string with the error's localized description.
336
+ */
337
+ error: string) => void): this;
284
338
  once(event: 'continue-activity-error', listener: (event: Event,
285
339
  /**
286
340
  * A string identifying the activity. Maps to `NSUserActivity.activityType`.
@@ -317,6 +371,7 @@ declare namespace Electron {
317
371
  * @platform darwin
318
372
  */
319
373
  on(event: 'did-become-active', listener: (event: Event) => void): this;
374
+ off(event: 'did-become-active', listener: (event: Event) => void): this;
320
375
  once(event: 'did-become-active', listener: (event: Event) => void): this;
321
376
  addListener(event: 'did-become-active', listener: (event: Event) => void): this;
322
377
  removeListener(event: 'did-become-active', listener: (event: Event) => void): this;
@@ -328,6 +383,7 @@ declare namespace Electron {
328
383
  * @platform darwin
329
384
  */
330
385
  on(event: 'did-resign-active', listener: (event: Event) => void): this;
386
+ off(event: 'did-resign-active', listener: (event: Event) => void): this;
331
387
  once(event: 'did-resign-active', listener: (event: Event) => void): this;
332
388
  addListener(event: 'did-resign-active', listener: (event: Event) => void): this;
333
389
  removeListener(event: 'did-resign-active', listener: (event: Event) => void): this;
@@ -335,6 +391,7 @@ declare namespace Electron {
335
391
  * Emitted whenever there is a GPU info update.
336
392
  */
337
393
  on(event: 'gpu-info-update', listener: Function): this;
394
+ off(event: 'gpu-info-update', listener: Function): this;
338
395
  once(event: 'gpu-info-update', listener: Function): this;
339
396
  addListener(event: 'gpu-info-update', listener: Function): this;
340
397
  removeListener(event: 'gpu-info-update', listener: Function): this;
@@ -350,6 +407,8 @@ declare namespace Electron {
350
407
  */
351
408
  on(event: 'gpu-process-crashed', listener: (event: Event,
352
409
  killed: boolean) => void): this;
410
+ off(event: 'gpu-process-crashed', listener: (event: Event,
411
+ killed: boolean) => void): this;
353
412
  once(event: 'gpu-process-crashed', listener: (event: Event,
354
413
  killed: boolean) => void): this;
355
414
  addListener(event: 'gpu-process-crashed', listener: (event: Event,
@@ -372,6 +431,11 @@ declare namespace Electron {
372
431
  authenticationResponseDetails: AuthenticationResponseDetails,
373
432
  authInfo: AuthInfo,
374
433
  callback: (username?: string, password?: string) => void) => void): this;
434
+ off(event: 'login', listener: (event: Event,
435
+ webContents: WebContents,
436
+ authenticationResponseDetails: AuthenticationResponseDetails,
437
+ authInfo: AuthInfo,
438
+ callback: (username?: string, password?: string) => void) => void): this;
375
439
  once(event: 'login', listener: (event: Event,
376
440
  webContents: WebContents,
377
441
  authenticationResponseDetails: AuthenticationResponseDetails,
@@ -394,6 +458,7 @@ declare namespace Electron {
394
458
  * @platform darwin
395
459
  */
396
460
  on(event: 'new-window-for-tab', listener: (event: Event) => void): this;
461
+ off(event: 'new-window-for-tab', listener: (event: Event) => void): this;
397
462
  once(event: 'new-window-for-tab', listener: (event: Event) => void): this;
398
463
  addListener(event: 'new-window-for-tab', listener: (event: Event) => void): this;
399
464
  removeListener(event: 'new-window-for-tab', listener: (event: Event) => void): this;
@@ -414,6 +479,8 @@ declare namespace Electron {
414
479
  */
415
480
  on(event: 'open-file', listener: (event: Event,
416
481
  path: string) => void): this;
482
+ off(event: 'open-file', listener: (event: Event,
483
+ path: string) => void): this;
417
484
  once(event: 'open-file', listener: (event: Event,
418
485
  path: string) => void): this;
419
486
  addListener(event: 'open-file', listener: (event: Event,
@@ -434,6 +501,8 @@ declare namespace Electron {
434
501
  */
435
502
  on(event: 'open-url', listener: (event: Event,
436
503
  url: string) => void): this;
504
+ off(event: 'open-url', listener: (event: Event,
505
+ url: string) => void): this;
437
506
  once(event: 'open-url', listener: (event: Event,
438
507
  url: string) => void): this;
439
508
  addListener(event: 'open-url', listener: (event: Event,
@@ -448,6 +517,8 @@ declare namespace Electron {
448
517
  */
449
518
  on(event: 'quit', listener: (event: Event,
450
519
  exitCode: number) => void): this;
520
+ off(event: 'quit', listener: (event: Event,
521
+ exitCode: number) => void): this;
451
522
  once(event: 'quit', listener: (event: Event,
452
523
  exitCode: number) => void): this;
453
524
  addListener(event: 'quit', listener: (event: Event,
@@ -467,6 +538,11 @@ declare namespace Electron {
467
538
  * @platform darwin
468
539
  */
469
540
  launchInfo: (Record<string, any>) | (NotificationResponse)) => void): this;
541
+ off(event: 'ready', listener: (event: Event,
542
+ /**
543
+ * @platform darwin
544
+ */
545
+ launchInfo: (Record<string, any>) | (NotificationResponse)) => void): this;
470
546
  once(event: 'ready', listener: (event: Event,
471
547
  /**
472
548
  * @platform darwin
@@ -489,6 +565,9 @@ declare namespace Electron {
489
565
  on(event: 'render-process-gone', listener: (event: Event,
490
566
  webContents: WebContents,
491
567
  details: RenderProcessGoneDetails) => void): this;
568
+ off(event: 'render-process-gone', listener: (event: Event,
569
+ webContents: WebContents,
570
+ details: RenderProcessGoneDetails) => void): this;
492
571
  once(event: 'render-process-gone', listener: (event: Event,
493
572
  webContents: WebContents,
494
573
  details: RenderProcessGoneDetails) => void): this;
@@ -511,6 +590,9 @@ declare namespace Electron {
511
590
  on(event: 'renderer-process-crashed', listener: (event: Event,
512
591
  webContents: WebContents,
513
592
  killed: boolean) => void): this;
593
+ off(event: 'renderer-process-crashed', listener: (event: Event,
594
+ webContents: WebContents,
595
+ killed: boolean) => void): this;
514
596
  once(event: 'renderer-process-crashed', listener: (event: Event,
515
597
  webContents: WebContents,
516
598
  killed: boolean) => void): this;
@@ -555,6 +637,19 @@ declare namespace Electron {
555
637
  * A JSON object of additional data passed from the second instance
556
638
  */
557
639
  additionalData: unknown) => void): this;
640
+ off(event: 'second-instance', listener: (event: Event,
641
+ /**
642
+ * An array of the second instance's command line arguments
643
+ */
644
+ argv: string[],
645
+ /**
646
+ * The second instance's working directory
647
+ */
648
+ workingDirectory: string,
649
+ /**
650
+ * A JSON object of additional data passed from the second instance
651
+ */
652
+ additionalData: unknown) => void): this;
558
653
  once(event: 'second-instance', listener: (event: Event,
559
654
  /**
560
655
  * An array of the second instance's command line arguments
@@ -607,6 +702,11 @@ declare namespace Electron {
607
702
  url: string,
608
703
  certificateList: Certificate[],
609
704
  callback: (certificate?: Certificate) => void) => void): this;
705
+ off(event: 'select-client-certificate', listener: (event: Event,
706
+ webContents: WebContents,
707
+ url: string,
708
+ certificateList: Certificate[],
709
+ callback: (certificate?: Certificate) => void) => void): this;
610
710
  once(event: 'select-client-certificate', listener: (event: Event,
611
711
  webContents: WebContents,
612
712
  url: string,
@@ -626,6 +726,7 @@ declare namespace Electron {
626
726
  * Emitted when Electron has created a new `session`.
627
727
  */
628
728
  on(event: 'session-created', listener: (session: Session) => void): this;
729
+ off(event: 'session-created', listener: (session: Session) => void): this;
629
730
  once(event: 'session-created', listener: (session: Session) => void): this;
630
731
  addListener(event: 'session-created', listener: (session: Session) => void): this;
631
732
  removeListener(event: 'session-created', listener: (session: Session) => void): this;
@@ -647,6 +748,15 @@ declare namespace Electron {
647
748
  * Contains app-specific state stored by the activity.
648
749
  */
649
750
  userInfo: unknown) => void): this;
751
+ off(event: 'update-activity-state', listener: (event: Event,
752
+ /**
753
+ * A string identifying the activity. Maps to `NSUserActivity.activityType`.
754
+ */
755
+ type: string,
756
+ /**
757
+ * Contains app-specific state stored by the activity.
758
+ */
759
+ userInfo: unknown) => void): this;
650
760
  once(event: 'update-activity-state', listener: (event: Event,
651
761
  /**
652
762
  * A string identifying the activity. Maps to `NSUserActivity.activityType`.
@@ -679,6 +789,8 @@ declare namespace Electron {
679
789
  */
680
790
  on(event: 'web-contents-created', listener: (event: Event,
681
791
  webContents: WebContents) => void): this;
792
+ off(event: 'web-contents-created', listener: (event: Event,
793
+ webContents: WebContents) => void): this;
682
794
  once(event: 'web-contents-created', listener: (event: Event,
683
795
  webContents: WebContents) => void): this;
684
796
  addListener(event: 'web-contents-created', listener: (event: Event,
@@ -697,6 +809,11 @@ declare namespace Electron {
697
809
  * A string identifying the activity. Maps to `NSUserActivity.activityType`.
698
810
  */
699
811
  type: string) => void): this;
812
+ off(event: 'will-continue-activity', listener: (event: Event,
813
+ /**
814
+ * A string identifying the activity. Maps to `NSUserActivity.activityType`.
815
+ */
816
+ type: string) => void): this;
700
817
  once(event: 'will-continue-activity', listener: (event: Event,
701
818
  /**
702
819
  * A string identifying the activity. Maps to `NSUserActivity.activityType`.
@@ -721,6 +838,7 @@ declare namespace Electron {
721
838
  * In most cases, you should do everything in the `ready` event handler.
722
839
  */
723
840
  on(event: 'will-finish-launching', listener: Function): this;
841
+ off(event: 'will-finish-launching', listener: Function): this;
724
842
  once(event: 'will-finish-launching', listener: Function): this;
725
843
  addListener(event: 'will-finish-launching', listener: Function): this;
726
844
  removeListener(event: 'will-finish-launching', listener: Function): this;
@@ -736,6 +854,7 @@ declare namespace Electron {
736
854
  * a shutdown/restart of the system or a user logout.
737
855
  */
738
856
  on(event: 'will-quit', listener: (event: Event) => void): this;
857
+ off(event: 'will-quit', listener: (event: Event) => void): this;
739
858
  once(event: 'will-quit', listener: (event: Event) => void): this;
740
859
  addListener(event: 'will-quit', listener: (event: Event) => void): this;
741
860
  removeListener(event: 'will-quit', listener: (event: Event) => void): this;
@@ -750,6 +869,7 @@ declare namespace Electron {
750
869
  * emitted.
751
870
  */
752
871
  on(event: 'window-all-closed', listener: Function): this;
872
+ off(event: 'window-all-closed', listener: Function): this;
753
873
  once(event: 'window-all-closed', listener: Function): this;
754
874
  addListener(event: 'window-all-closed', listener: Function): this;
755
875
  removeListener(event: 'window-all-closed', listener: Function): this;
@@ -1569,21 +1689,6 @@ declare namespace Electron {
1569
1689
  * @platform darwin,win32
1570
1690
  */
1571
1691
  readonly runningUnderARM64Translation: boolean;
1572
- /**
1573
- * A `boolean` which when `true` indicates that the app is currently running under
1574
- * the Rosetta Translator Environment.
1575
- *
1576
- * You can use this property to prompt users to download the arm64 version of your
1577
- * application when they are running the x64 version under Rosetta incorrectly.
1578
- *
1579
- * **Deprecated:** This property is superceded by the
1580
- * `runningUnderARM64Translation` property which detects when the app is being
1581
- * translated to ARM64 in both macOS and Windows.
1582
- *
1583
- * @deprecated
1584
- * @platform darwin
1585
- */
1586
- readonly runningUnderRosettaTranslation: boolean;
1587
1692
  /**
1588
1693
  * A `string` which is the user agent string Electron will use as a global
1589
1694
  * fallback.
@@ -1609,6 +1714,7 @@ declare namespace Electron {
1609
1714
  * well as listening to `before-quit`.
1610
1715
  */
1611
1716
  on(event: 'before-quit-for-update', listener: Function): this;
1717
+ off(event: 'before-quit-for-update', listener: Function): this;
1612
1718
  once(event: 'before-quit-for-update', listener: Function): this;
1613
1719
  addListener(event: 'before-quit-for-update', listener: Function): this;
1614
1720
  removeListener(event: 'before-quit-for-update', listener: Function): this;
@@ -1616,6 +1722,7 @@ declare namespace Electron {
1616
1722
  * Emitted when checking if an update has started.
1617
1723
  */
1618
1724
  on(event: 'checking-for-update', listener: Function): this;
1725
+ off(event: 'checking-for-update', listener: Function): this;
1619
1726
  once(event: 'checking-for-update', listener: Function): this;
1620
1727
  addListener(event: 'checking-for-update', listener: Function): this;
1621
1728
  removeListener(event: 'checking-for-update', listener: Function): this;
@@ -1623,6 +1730,7 @@ declare namespace Electron {
1623
1730
  * Emitted when there is an error while updating.
1624
1731
  */
1625
1732
  on(event: 'error', listener: (error: Error) => void): this;
1733
+ off(event: 'error', listener: (error: Error) => void): this;
1626
1734
  once(event: 'error', listener: (error: Error) => void): this;
1627
1735
  addListener(event: 'error', listener: (error: Error) => void): this;
1628
1736
  removeListener(event: 'error', listener: (error: Error) => void): this;
@@ -1631,6 +1739,7 @@ declare namespace Electron {
1631
1739
  * automatically.
1632
1740
  */
1633
1741
  on(event: 'update-available', listener: Function): this;
1742
+ off(event: 'update-available', listener: Function): this;
1634
1743
  once(event: 'update-available', listener: Function): this;
1635
1744
  addListener(event: 'update-available', listener: Function): this;
1636
1745
  removeListener(event: 'update-available', listener: Function): this;
@@ -1647,6 +1756,11 @@ declare namespace Electron {
1647
1756
  releaseName: string,
1648
1757
  releaseDate: Date,
1649
1758
  updateURL: string) => void): this;
1759
+ off(event: 'update-downloaded', listener: (event: Event,
1760
+ releaseNotes: string,
1761
+ releaseName: string,
1762
+ releaseDate: Date,
1763
+ updateURL: string) => void): this;
1650
1764
  once(event: 'update-downloaded', listener: (event: Event,
1651
1765
  releaseNotes: string,
1652
1766
  releaseName: string,
@@ -1666,6 +1780,7 @@ declare namespace Electron {
1666
1780
  * Emitted when there is no available update.
1667
1781
  */
1668
1782
  on(event: 'update-not-available', listener: Function): this;
1783
+ off(event: 'update-not-available', listener: Function): this;
1669
1784
  once(event: 'update-not-available', listener: Function): this;
1670
1785
  addListener(event: 'update-not-available', listener: Function): this;
1671
1786
  removeListener(event: 'update-not-available', listener: Function): this;
@@ -1780,6 +1895,8 @@ declare namespace Electron {
1780
1895
  */
1781
1896
  on(event: 'always-on-top-changed', listener: (event: Event,
1782
1897
  isAlwaysOnTop: boolean) => void): this;
1898
+ off(event: 'always-on-top-changed', listener: (event: Event,
1899
+ isAlwaysOnTop: boolean) => void): this;
1783
1900
  once(event: 'always-on-top-changed', listener: (event: Event,
1784
1901
  isAlwaysOnTop: boolean) => void): this;
1785
1902
  addListener(event: 'always-on-top-changed', listener: (event: Event,
@@ -1804,6 +1921,8 @@ declare namespace Electron {
1804
1921
  */
1805
1922
  on(event: 'app-command', listener: (event: Event,
1806
1923
  command: string) => void): this;
1924
+ off(event: 'app-command', listener: (event: Event,
1925
+ command: string) => void): this;
1807
1926
  once(event: 'app-command', listener: (event: Event,
1808
1927
  command: string) => void): this;
1809
1928
  addListener(event: 'app-command', listener: (event: Event,
@@ -1814,6 +1933,7 @@ declare namespace Electron {
1814
1933
  * Emitted when the window loses focus.
1815
1934
  */
1816
1935
  on(event: 'blur', listener: Function): this;
1936
+ off(event: 'blur', listener: Function): this;
1817
1937
  once(event: 'blur', listener: Function): this;
1818
1938
  addListener(event: 'blur', listener: Function): this;
1819
1939
  removeListener(event: 'blur', listener: Function): this;
@@ -1834,6 +1954,7 @@ declare namespace Electron {
1834
1954
  * Electron._
1835
1955
  */
1836
1956
  on(event: 'close', listener: (event: Event) => void): this;
1957
+ off(event: 'close', listener: (event: Event) => void): this;
1837
1958
  once(event: 'close', listener: (event: Event) => void): this;
1838
1959
  addListener(event: 'close', listener: (event: Event) => void): this;
1839
1960
  removeListener(event: 'close', listener: (event: Event) => void): this;
@@ -1842,6 +1963,7 @@ declare namespace Electron {
1842
1963
  * remove the reference to the window and avoid using it any more.
1843
1964
  */
1844
1965
  on(event: 'closed', listener: Function): this;
1966
+ off(event: 'closed', listener: Function): this;
1845
1967
  once(event: 'closed', listener: Function): this;
1846
1968
  addListener(event: 'closed', listener: Function): this;
1847
1969
  removeListener(event: 'closed', listener: Function): this;
@@ -1849,6 +1971,7 @@ declare namespace Electron {
1849
1971
  * Emitted when the window enters a full-screen state.
1850
1972
  */
1851
1973
  on(event: 'enter-full-screen', listener: Function): this;
1974
+ off(event: 'enter-full-screen', listener: Function): this;
1852
1975
  once(event: 'enter-full-screen', listener: Function): this;
1853
1976
  addListener(event: 'enter-full-screen', listener: Function): this;
1854
1977
  removeListener(event: 'enter-full-screen', listener: Function): this;
@@ -1856,6 +1979,7 @@ declare namespace Electron {
1856
1979
  * Emitted when the window enters a full-screen state triggered by HTML API.
1857
1980
  */
1858
1981
  on(event: 'enter-html-full-screen', listener: Function): this;
1982
+ off(event: 'enter-html-full-screen', listener: Function): this;
1859
1983
  once(event: 'enter-html-full-screen', listener: Function): this;
1860
1984
  addListener(event: 'enter-html-full-screen', listener: Function): this;
1861
1985
  removeListener(event: 'enter-html-full-screen', listener: Function): this;
@@ -1863,6 +1987,7 @@ declare namespace Electron {
1863
1987
  * Emitted when the window gains focus.
1864
1988
  */
1865
1989
  on(event: 'focus', listener: Function): this;
1990
+ off(event: 'focus', listener: Function): this;
1866
1991
  once(event: 'focus', listener: Function): this;
1867
1992
  addListener(event: 'focus', listener: Function): this;
1868
1993
  removeListener(event: 'focus', listener: Function): this;
@@ -1870,6 +1995,7 @@ declare namespace Electron {
1870
1995
  * Emitted when the window is hidden.
1871
1996
  */
1872
1997
  on(event: 'hide', listener: Function): this;
1998
+ off(event: 'hide', listener: Function): this;
1873
1999
  once(event: 'hide', listener: Function): this;
1874
2000
  addListener(event: 'hide', listener: Function): this;
1875
2001
  removeListener(event: 'hide', listener: Function): this;
@@ -1877,6 +2003,7 @@ declare namespace Electron {
1877
2003
  * Emitted when the window leaves a full-screen state.
1878
2004
  */
1879
2005
  on(event: 'leave-full-screen', listener: Function): this;
2006
+ off(event: 'leave-full-screen', listener: Function): this;
1880
2007
  once(event: 'leave-full-screen', listener: Function): this;
1881
2008
  addListener(event: 'leave-full-screen', listener: Function): this;
1882
2009
  removeListener(event: 'leave-full-screen', listener: Function): this;
@@ -1884,6 +2011,7 @@ declare namespace Electron {
1884
2011
  * Emitted when the window leaves a full-screen state triggered by HTML API.
1885
2012
  */
1886
2013
  on(event: 'leave-html-full-screen', listener: Function): this;
2014
+ off(event: 'leave-html-full-screen', listener: Function): this;
1887
2015
  once(event: 'leave-html-full-screen', listener: Function): this;
1888
2016
  addListener(event: 'leave-html-full-screen', listener: Function): this;
1889
2017
  removeListener(event: 'leave-html-full-screen', listener: Function): this;
@@ -1891,6 +2019,7 @@ declare namespace Electron {
1891
2019
  * Emitted when window is maximized.
1892
2020
  */
1893
2021
  on(event: 'maximize', listener: Function): this;
2022
+ off(event: 'maximize', listener: Function): this;
1894
2023
  once(event: 'maximize', listener: Function): this;
1895
2024
  addListener(event: 'maximize', listener: Function): this;
1896
2025
  removeListener(event: 'maximize', listener: Function): this;
@@ -1898,6 +2027,7 @@ declare namespace Electron {
1898
2027
  * Emitted when the window is minimized.
1899
2028
  */
1900
2029
  on(event: 'minimize', listener: Function): this;
2030
+ off(event: 'minimize', listener: Function): this;
1901
2031
  once(event: 'minimize', listener: Function): this;
1902
2032
  addListener(event: 'minimize', listener: Function): this;
1903
2033
  removeListener(event: 'minimize', listener: Function): this;
@@ -1905,6 +2035,7 @@ declare namespace Electron {
1905
2035
  * Emitted when the window is being moved to a new position.
1906
2036
  */
1907
2037
  on(event: 'move', listener: Function): this;
2038
+ off(event: 'move', listener: Function): this;
1908
2039
  once(event: 'move', listener: Function): this;
1909
2040
  addListener(event: 'move', listener: Function): this;
1910
2041
  removeListener(event: 'move', listener: Function): this;
@@ -1916,6 +2047,7 @@ declare namespace Electron {
1916
2047
  * @platform darwin,win32
1917
2048
  */
1918
2049
  on(event: 'moved', listener: Function): this;
2050
+ off(event: 'moved', listener: Function): this;
1919
2051
  once(event: 'moved', listener: Function): this;
1920
2052
  addListener(event: 'moved', listener: Function): this;
1921
2053
  removeListener(event: 'moved', listener: Function): this;
@@ -1925,6 +2057,7 @@ declare namespace Electron {
1925
2057
  * @platform darwin
1926
2058
  */
1927
2059
  on(event: 'new-window-for-tab', listener: Function): this;
2060
+ off(event: 'new-window-for-tab', listener: Function): this;
1928
2061
  once(event: 'new-window-for-tab', listener: Function): this;
1929
2062
  addListener(event: 'new-window-for-tab', listener: Function): this;
1930
2063
  removeListener(event: 'new-window-for-tab', listener: Function): this;
@@ -1936,6 +2069,9 @@ declare namespace Electron {
1936
2069
  on(event: 'page-title-updated', listener: (event: Event,
1937
2070
  title: string,
1938
2071
  explicitSet: boolean) => void): this;
2072
+ off(event: 'page-title-updated', listener: (event: Event,
2073
+ title: string,
2074
+ explicitSet: boolean) => void): this;
1939
2075
  once(event: 'page-title-updated', listener: (event: Event,
1940
2076
  title: string,
1941
2077
  explicitSet: boolean) => void): this;
@@ -1954,6 +2090,7 @@ declare namespace Electron {
1954
2090
  * you use `paintWhenInitiallyHidden: false`
1955
2091
  */
1956
2092
  on(event: 'ready-to-show', listener: Function): this;
2093
+ off(event: 'ready-to-show', listener: Function): this;
1957
2094
  once(event: 'ready-to-show', listener: Function): this;
1958
2095
  addListener(event: 'ready-to-show', listener: Function): this;
1959
2096
  removeListener(event: 'ready-to-show', listener: Function): this;
@@ -1961,6 +2098,7 @@ declare namespace Electron {
1961
2098
  * Emitted after the window has been resized.
1962
2099
  */
1963
2100
  on(event: 'resize', listener: Function): this;
2101
+ off(event: 'resize', listener: Function): this;
1964
2102
  once(event: 'resize', listener: Function): this;
1965
2103
  addListener(event: 'resize', listener: Function): this;
1966
2104
  removeListener(event: 'resize', listener: Function): this;
@@ -1974,6 +2112,7 @@ declare namespace Electron {
1974
2112
  * @platform darwin,win32
1975
2113
  */
1976
2114
  on(event: 'resized', listener: Function): this;
2115
+ off(event: 'resized', listener: Function): this;
1977
2116
  once(event: 'resized', listener: Function): this;
1978
2117
  addListener(event: 'resized', listener: Function): this;
1979
2118
  removeListener(event: 'resized', listener: Function): this;
@@ -1981,6 +2120,7 @@ declare namespace Electron {
1981
2120
  * Emitted when the unresponsive web page becomes responsive again.
1982
2121
  */
1983
2122
  on(event: 'responsive', listener: Function): this;
2123
+ off(event: 'responsive', listener: Function): this;
1984
2124
  once(event: 'responsive', listener: Function): this;
1985
2125
  addListener(event: 'responsive', listener: Function): this;
1986
2126
  removeListener(event: 'responsive', listener: Function): this;
@@ -1988,6 +2128,7 @@ declare namespace Electron {
1988
2128
  * Emitted when the window is restored from a minimized state.
1989
2129
  */
1990
2130
  on(event: 'restore', listener: Function): this;
2131
+ off(event: 'restore', listener: Function): this;
1991
2132
  once(event: 'restore', listener: Function): this;
1992
2133
  addListener(event: 'restore', listener: Function): this;
1993
2134
  removeListener(event: 'restore', listener: Function): this;
@@ -2002,54 +2143,14 @@ declare namespace Electron {
2002
2143
  */
2003
2144
  on(event: 'rotate-gesture', listener: (event: Event,
2004
2145
  rotation: number) => void): this;
2146
+ off(event: 'rotate-gesture', listener: (event: Event,
2147
+ rotation: number) => void): this;
2005
2148
  once(event: 'rotate-gesture', listener: (event: Event,
2006
2149
  rotation: number) => void): this;
2007
2150
  addListener(event: 'rotate-gesture', listener: (event: Event,
2008
2151
  rotation: number) => void): this;
2009
2152
  removeListener(event: 'rotate-gesture', listener: (event: Event,
2010
2153
  rotation: number) => void): this;
2011
- /**
2012
- * Emitted when scroll wheel event phase has begun.
2013
- *
2014
- * > **Note** This event is deprecated beginning in Electron 22.0.0. See Breaking
2015
- * Changes for details of how to migrate to using the WebContents `input-event`
2016
- * event.
2017
- *
2018
- * @deprecated
2019
- * @platform darwin
2020
- */
2021
- on(event: 'scroll-touch-begin', listener: Function): this;
2022
- once(event: 'scroll-touch-begin', listener: Function): this;
2023
- addListener(event: 'scroll-touch-begin', listener: Function): this;
2024
- removeListener(event: 'scroll-touch-begin', listener: Function): this;
2025
- /**
2026
- * Emitted when scroll wheel event phase filed upon reaching the edge of element.
2027
- *
2028
- * > **Note** This event is deprecated beginning in Electron 22.0.0. See Breaking
2029
- * Changes for details of how to migrate to using the WebContents `input-event`
2030
- * event.
2031
- *
2032
- * @deprecated
2033
- * @platform darwin
2034
- */
2035
- on(event: 'scroll-touch-edge', listener: Function): this;
2036
- once(event: 'scroll-touch-edge', listener: Function): this;
2037
- addListener(event: 'scroll-touch-edge', listener: Function): this;
2038
- removeListener(event: 'scroll-touch-edge', listener: Function): this;
2039
- /**
2040
- * Emitted when scroll wheel event phase has ended.
2041
- *
2042
- * > **Note** This event is deprecated beginning in Electron 22.0.0. See Breaking
2043
- * Changes for details of how to migrate to using the WebContents `input-event`
2044
- * event.
2045
- *
2046
- * @deprecated
2047
- * @platform darwin
2048
- */
2049
- on(event: 'scroll-touch-end', listener: Function): this;
2050
- once(event: 'scroll-touch-end', listener: Function): this;
2051
- addListener(event: 'scroll-touch-end', listener: Function): this;
2052
- removeListener(event: 'scroll-touch-end', listener: Function): this;
2053
2154
  /**
2054
2155
  * Emitted when window session is going to end due to force shutdown or machine
2055
2156
  * restart or session log off.
@@ -2057,6 +2158,7 @@ declare namespace Electron {
2057
2158
  * @platform win32
2058
2159
  */
2059
2160
  on(event: 'session-end', listener: Function): this;
2161
+ off(event: 'session-end', listener: Function): this;
2060
2162
  once(event: 'session-end', listener: Function): this;
2061
2163
  addListener(event: 'session-end', listener: Function): this;
2062
2164
  removeListener(event: 'session-end', listener: Function): this;
@@ -2066,6 +2168,7 @@ declare namespace Electron {
2066
2168
  * @platform darwin
2067
2169
  */
2068
2170
  on(event: 'sheet-begin', listener: Function): this;
2171
+ off(event: 'sheet-begin', listener: Function): this;
2069
2172
  once(event: 'sheet-begin', listener: Function): this;
2070
2173
  addListener(event: 'sheet-begin', listener: Function): this;
2071
2174
  removeListener(event: 'sheet-begin', listener: Function): this;
@@ -2075,6 +2178,7 @@ declare namespace Electron {
2075
2178
  * @platform darwin
2076
2179
  */
2077
2180
  on(event: 'sheet-end', listener: Function): this;
2181
+ off(event: 'sheet-end', listener: Function): this;
2078
2182
  once(event: 'sheet-end', listener: Function): this;
2079
2183
  addListener(event: 'sheet-end', listener: Function): this;
2080
2184
  removeListener(event: 'sheet-end', listener: Function): this;
@@ -2082,6 +2186,7 @@ declare namespace Electron {
2082
2186
  * Emitted when the window is shown.
2083
2187
  */
2084
2188
  on(event: 'show', listener: Function): this;
2189
+ off(event: 'show', listener: Function): this;
2085
2190
  once(event: 'show', listener: Function): this;
2086
2191
  addListener(event: 'show', listener: Function): this;
2087
2192
  removeListener(event: 'show', listener: Function): this;
@@ -2100,6 +2205,8 @@ declare namespace Electron {
2100
2205
  */
2101
2206
  on(event: 'swipe', listener: (event: Event,
2102
2207
  direction: string) => void): this;
2208
+ off(event: 'swipe', listener: (event: Event,
2209
+ direction: string) => void): this;
2103
2210
  once(event: 'swipe', listener: (event: Event,
2104
2211
  direction: string) => void): this;
2105
2212
  addListener(event: 'swipe', listener: (event: Event,
@@ -2121,6 +2228,11 @@ declare namespace Electron {
2121
2228
  * The screen coordinates the context menu was triggered at
2122
2229
  */
2123
2230
  point: Point) => void): this;
2231
+ off(event: 'system-context-menu', listener: (event: Event,
2232
+ /**
2233
+ * The screen coordinates the context menu was triggered at
2234
+ */
2235
+ point: Point) => void): this;
2124
2236
  once(event: 'system-context-menu', listener: (event: Event,
2125
2237
  /**
2126
2238
  * The screen coordinates the context menu was triggered at
@@ -2140,6 +2252,7 @@ declare namespace Electron {
2140
2252
  * Emitted when the window exits from a maximized state.
2141
2253
  */
2142
2254
  on(event: 'unmaximize', listener: Function): this;
2255
+ off(event: 'unmaximize', listener: Function): this;
2143
2256
  once(event: 'unmaximize', listener: Function): this;
2144
2257
  addListener(event: 'unmaximize', listener: Function): this;
2145
2258
  removeListener(event: 'unmaximize', listener: Function): this;
@@ -2147,6 +2260,7 @@ declare namespace Electron {
2147
2260
  * Emitted when the web page becomes unresponsive.
2148
2261
  */
2149
2262
  on(event: 'unresponsive', listener: Function): this;
2263
+ off(event: 'unresponsive', listener: Function): this;
2150
2264
  once(event: 'unresponsive', listener: Function): this;
2151
2265
  addListener(event: 'unresponsive', listener: Function): this;
2152
2266
  removeListener(event: 'unresponsive', listener: Function): this;
@@ -2164,6 +2278,11 @@ declare namespace Electron {
2164
2278
  * Location the window is being moved to.
2165
2279
  */
2166
2280
  newBounds: Rectangle) => void): this;
2281
+ off(event: 'will-move', listener: (event: Event,
2282
+ /**
2283
+ * Location the window is being moved to.
2284
+ */
2285
+ newBounds: Rectangle) => void): this;
2167
2286
  once(event: 'will-move', listener: (event: Event,
2168
2287
  /**
2169
2288
  * Location the window is being moved to.
@@ -2203,6 +2322,12 @@ declare namespace Electron {
2203
2322
  */
2204
2323
  newBounds: Rectangle,
2205
2324
  details: WillResizeDetails) => void): this;
2325
+ off(event: 'will-resize', listener: (event: Event,
2326
+ /**
2327
+ * Size the window is being resized to.
2328
+ */
2329
+ newBounds: Rectangle,
2330
+ details: WillResizeDetails) => void): this;
2206
2331
  once(event: 'will-resize', listener: (event: Event,
2207
2332
  /**
2208
2333
  * Size the window is being resized to.
@@ -2417,16 +2542,6 @@ declare namespace Electron {
2417
2542
  * native window.
2418
2543
  */
2419
2544
  getTitle(): string;
2420
- /**
2421
- * The custom position for the traffic light buttons in frameless window, `{ x: 0,
2422
- * y: 0 }` will be returned when there is no custom position.
2423
- *
2424
- * > **Note** This function is deprecated. Use getWindowButtonPosition instead.
2425
- *
2426
- * @deprecated
2427
- * @platform darwin
2428
- */
2429
- getTrafficLightPosition(): Point;
2430
2545
  /**
2431
2546
  * The custom position for the traffic light buttons in frameless window, `null`
2432
2547
  * will be returned when there is no custom position.
@@ -3109,16 +3224,6 @@ declare namespace Electron {
3109
3224
  * @platform darwin
3110
3225
  */
3111
3226
  setTouchBar(touchBar: (TouchBar) | (null)): void;
3112
- /**
3113
- * Set a custom position for the traffic light buttons in frameless window. Passing
3114
- * `{ x: 0, y: 0 }` will reset the position to default.
3115
- *
3116
- * > **Note** This function is deprecated. Use setWindowButtonPosition instead.
3117
- *
3118
- * @deprecated
3119
- * @platform darwin
3120
- */
3121
- setTrafficLightPosition(position: Point): void;
3122
3227
  /**
3123
3228
  * Adds a vibrancy effect to the browser window. Passing `null` or an empty string
3124
3229
  * will remove the vibrancy effect on the window.
@@ -3311,6 +3416,13 @@ declare namespace Electron {
3311
3416
  * fullscreen mode.
3312
3417
  */
3313
3418
  simpleFullScreen: boolean;
3419
+ /**
3420
+ * A `string` (optional) property that is equal to the `tabbingIdentifier` passed
3421
+ * to the `BrowserWindow` constructor or `undefined` if none was set.
3422
+ *
3423
+ * @platform darwin
3424
+ */
3425
+ readonly tabbingIdentifier?: string;
3314
3426
  /**
3315
3427
  * A `string` property that determines the title of the native window.
3316
3428
  *
@@ -3420,14 +3532,6 @@ declare namespace Electron {
3420
3532
  * is `true`.
3421
3533
  */
3422
3534
  fullscreenable?: boolean;
3423
- /**
3424
- * Shows the title in the title bar in full screen mode on macOS for `hiddenInset`
3425
- * titleBarStyle. Default is `false`.
3426
- *
3427
- * @deprecated
3428
- * @platform darwin
3429
- */
3430
- fullscreenWindowTitle?: boolean;
3431
3535
  /**
3432
3536
  * Whether window should have a shadow. Default is `true`.
3433
3537
  */
@@ -3726,6 +3830,7 @@ declare namespace Electron {
3726
3830
  * the `request` is already closed.
3727
3831
  */
3728
3832
  on(event: 'abort', listener: Function): this;
3833
+ off(event: 'abort', listener: Function): this;
3729
3834
  once(event: 'abort', listener: Function): this;
3730
3835
  addListener(event: 'abort', listener: Function): this;
3731
3836
  removeListener(event: 'abort', listener: Function): this;
@@ -3735,6 +3840,7 @@ declare namespace Electron {
3735
3840
  * `response` objects.
3736
3841
  */
3737
3842
  on(event: 'close', listener: Function): this;
3843
+ off(event: 'close', listener: Function): this;
3738
3844
  once(event: 'close', listener: Function): this;
3739
3845
  addListener(event: 'close', listener: Function): this;
3740
3846
  removeListener(event: 'close', listener: Function): this;
@@ -3748,6 +3854,11 @@ declare namespace Electron {
3748
3854
  * an error object providing some information about the failure.
3749
3855
  */
3750
3856
  error: Error) => void): this;
3857
+ off(event: 'error', listener: (
3858
+ /**
3859
+ * an error object providing some information about the failure.
3860
+ */
3861
+ error: Error) => void): this;
3751
3862
  once(event: 'error', listener: (
3752
3863
  /**
3753
3864
  * an error object providing some information about the failure.
@@ -3768,6 +3879,7 @@ declare namespace Electron {
3768
3879
  * the `request` object.
3769
3880
  */
3770
3881
  on(event: 'finish', listener: Function): this;
3882
+ off(event: 'finish', listener: Function): this;
3771
3883
  once(event: 'finish', listener: Function): this;
3772
3884
  addListener(event: 'finish', listener: Function): this;
3773
3885
  removeListener(event: 'finish', listener: Function): this;
@@ -3784,6 +3896,8 @@ declare namespace Electron {
3784
3896
  */
3785
3897
  on(event: 'login', listener: (authInfo: AuthInfo,
3786
3898
  callback: (username?: string, password?: string) => void) => void): this;
3899
+ off(event: 'login', listener: (authInfo: AuthInfo,
3900
+ callback: (username?: string, password?: string) => void) => void): this;
3787
3901
  once(event: 'login', listener: (authInfo: AuthInfo,
3788
3902
  callback: (username?: string, password?: string) => void) => void): this;
3789
3903
  addListener(event: 'login', listener: (authInfo: AuthInfo,
@@ -3800,6 +3914,10 @@ declare namespace Electron {
3800
3914
  method: string,
3801
3915
  redirectUrl: string,
3802
3916
  responseHeaders: Record<string, string[]>) => void): this;
3917
+ off(event: 'redirect', listener: (statusCode: number,
3918
+ method: string,
3919
+ redirectUrl: string,
3920
+ responseHeaders: Record<string, string[]>) => void): this;
3803
3921
  once(event: 'redirect', listener: (statusCode: number,
3804
3922
  method: string,
3805
3923
  redirectUrl: string,
@@ -3817,6 +3935,11 @@ declare namespace Electron {
3817
3935
  * An object representing the HTTP response message.
3818
3936
  */
3819
3937
  response: IncomingMessage) => void): this;
3938
+ off(event: 'response', listener: (
3939
+ /**
3940
+ * An object representing the HTTP response message.
3941
+ */
3942
+ response: IncomingMessage) => void): this;
3820
3943
  once(event: 'response', listener: (
3821
3944
  /**
3822
3945
  * An object representing the HTTP response message.
@@ -4220,6 +4343,19 @@ declare namespace Electron {
4220
4343
  * `true` if the cookie was removed, `false` otherwise.
4221
4344
  */
4222
4345
  removed: boolean) => void): this;
4346
+ off(event: 'changed', listener: (event: Event,
4347
+ /**
4348
+ * The cookie that was changed.
4349
+ */
4350
+ cookie: Cookie,
4351
+ /**
4352
+ * The cause of the change with one of the following values:
4353
+ */
4354
+ cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'),
4355
+ /**
4356
+ * `true` if the cookie was removed, `false` otherwise.
4357
+ */
4358
+ removed: boolean) => void): this;
4223
4359
  once(event: 'changed', listener: (event: Event,
4224
4360
  /**
4225
4361
  * The cookie that was changed.
@@ -4427,6 +4563,11 @@ declare namespace Electron {
4427
4563
  * Reason for detaching debugger.
4428
4564
  */
4429
4565
  reason: string) => void): this;
4566
+ off(event: 'detach', listener: (event: Event,
4567
+ /**
4568
+ * Reason for detaching debugger.
4569
+ */
4570
+ reason: string) => void): this;
4430
4571
  once(event: 'detach', listener: (event: Event,
4431
4572
  /**
4432
4573
  * Reason for detaching debugger.
@@ -4460,6 +4601,21 @@ declare namespace Electron {
4460
4601
  * `debugger.sendCommand`.
4461
4602
  */
4462
4603
  sessionId: string) => void): this;
4604
+ off(event: 'message', listener: (event: Event,
4605
+ /**
4606
+ * Method name.
4607
+ */
4608
+ method: string,
4609
+ /**
4610
+ * Event parameters defined by the 'parameters' attribute in the remote debugging
4611
+ * protocol.
4612
+ */
4613
+ params: any,
4614
+ /**
4615
+ * Unique identifier of attached debugging session, will match the value sent from
4616
+ * `debugger.sendCommand`.
4617
+ */
4618
+ sessionId: string) => void): this;
4463
4619
  once(event: 'message', listener: (event: Event,
4464
4620
  /**
4465
4621
  * Method name.
@@ -5002,6 +5158,11 @@ declare namespace Electron {
5002
5158
  * Can be `completed`, `cancelled` or `interrupted`.
5003
5159
  */
5004
5160
  state: ('completed' | 'cancelled' | 'interrupted')) => void): this;
5161
+ off(event: 'done', listener: (event: Event,
5162
+ /**
5163
+ * Can be `completed`, `cancelled` or `interrupted`.
5164
+ */
5165
+ state: ('completed' | 'cancelled' | 'interrupted')) => void): this;
5005
5166
  once(event: 'done', listener: (event: Event,
5006
5167
  /**
5007
5168
  * Can be `completed`, `cancelled` or `interrupted`.
@@ -5030,6 +5191,11 @@ declare namespace Electron {
5030
5191
  * Can be `progressing` or `interrupted`.
5031
5192
  */
5032
5193
  state: ('progressing' | 'interrupted')) => void): this;
5194
+ off(event: 'updated', listener: (event: Event,
5195
+ /**
5196
+ * Can be `progressing` or `interrupted`.
5197
+ */
5198
+ state: ('progressing' | 'interrupted')) => void): this;
5033
5199
  once(event: 'updated', listener: (event: Event,
5034
5200
  /**
5035
5201
  * Can be `progressing` or `interrupted`.
@@ -5366,6 +5532,7 @@ declare namespace Electron {
5366
5532
  // Docs: https://electronjs.org/docs/api/in-app-purchase
5367
5533
 
5368
5534
  on(event: 'transactions-updated', listener: Function): this;
5535
+ off(event: 'transactions-updated', listener: Function): this;
5369
5536
  once(event: 'transactions-updated', listener: Function): this;
5370
5537
  addListener(event: 'transactions-updated', listener: Function): this;
5371
5538
  removeListener(event: 'transactions-updated', listener: Function): this;
@@ -5418,6 +5585,7 @@ declare namespace Electron {
5418
5585
  * Emitted when a request has been canceled during an ongoing HTTP transaction.
5419
5586
  */
5420
5587
  on(event: 'aborted', listener: Function): this;
5588
+ off(event: 'aborted', listener: Function): this;
5421
5589
  once(event: 'aborted', listener: Function): this;
5422
5590
  addListener(event: 'aborted', listener: Function): this;
5423
5591
  removeListener(event: 'aborted', listener: Function): this;
@@ -5430,6 +5598,11 @@ declare namespace Electron {
5430
5598
  * A chunk of response body's data.
5431
5599
  */
5432
5600
  chunk: Buffer) => void): this;
5601
+ off(event: 'data', listener: (
5602
+ /**
5603
+ * A chunk of response body's data.
5604
+ */
5605
+ chunk: Buffer) => void): this;
5433
5606
  once(event: 'data', listener: (
5434
5607
  /**
5435
5608
  * A chunk of response body's data.
@@ -5449,6 +5622,7 @@ declare namespace Electron {
5449
5622
  * Indicates that response body has ended. Must be placed before 'data' event.
5450
5623
  */
5451
5624
  on(event: 'end', listener: Function): this;
5625
+ off(event: 'end', listener: Function): this;
5452
5626
  once(event: 'end', listener: Function): this;
5453
5627
  addListener(event: 'end', listener: Function): this;
5454
5628
  removeListener(event: 'end', listener: Function): this;
@@ -5463,6 +5637,7 @@ declare namespace Electron {
5463
5637
  * event will subsequently follow on the request object.
5464
5638
  */
5465
5639
  on(event: 'error', listener: Function): this;
5640
+ off(event: 'error', listener: Function): this;
5466
5641
  once(event: 'error', listener: Function): this;
5467
5642
  addListener(event: 'error', listener: Function): this;
5468
5643
  removeListener(event: 'error', listener: Function): this;
@@ -5684,6 +5859,10 @@ declare namespace Electron {
5684
5859
 
5685
5860
  // Docs: https://electronjs.org/docs/api/ipc-renderer
5686
5861
 
5862
+ /**
5863
+ * Alias for `ipcRenderer.on`.
5864
+ */
5865
+ addListener(channel: string, listener: (event: IpcRendererEvent, ...args: any[]) => void): this;
5687
5866
  /**
5688
5867
  * Resolves with the response from the main process.
5689
5868
  *
@@ -5715,6 +5894,10 @@ declare namespace Electron {
5715
5894
  * process will not be the same as the one thrown in the main process.
5716
5895
  */
5717
5896
  invoke(channel: string, ...args: any[]): Promise<any>;
5897
+ /**
5898
+ * Alias for `ipcRenderer.removeListener`.
5899
+ */
5900
+ off(channel: string, listener: (event: IpcRendererEvent, ...args: any[]) => void): this;
5718
5901
  /**
5719
5902
  * Listens to `channel`, when a new message arrives `listener` would be called with
5720
5903
  * `listener(event, args...)`.
@@ -5747,7 +5930,7 @@ declare namespace Electron {
5747
5930
  * Removes the specified `listener` from the listener array for the specified
5748
5931
  * `channel`.
5749
5932
  */
5750
- removeListener(channel: string, listener: (...args: any[]) => void): this;
5933
+ removeListener(channel: string, listener: (event: IpcRendererEvent, ...args: any[]) => void): this;
5751
5934
  /**
5752
5935
  * Send an asynchronous message to the main process via `channel`, along with
5753
5936
  * arguments. Arguments will be serialized with the Structured Clone Algorithm,
@@ -5798,12 +5981,6 @@ declare namespace Electron {
5798
5981
  * resort. It's much better to use the asynchronous version, `invoke()`.
5799
5982
  */
5800
5983
  sendSync(channel: string, ...args: any[]): any;
5801
- /**
5802
- * Sends a message to a window with `webContentsId` via `channel`.
5803
- *
5804
- * @deprecated
5805
- */
5806
- sendTo(webContentsId: number, channel: string, ...args: any[]): void;
5807
5984
  /**
5808
5985
  * Like `ipcRenderer.send` but the event will be sent to the `<webview>` element in
5809
5986
  * the host page instead of the main process.
@@ -5823,24 +6000,6 @@ declare namespace Electron {
5823
6000
  * The `IpcRenderer` instance that emitted the event originally
5824
6001
  */
5825
6002
  sender: IpcRenderer;
5826
- /**
5827
- * The `webContents.id` that sent the message, you can call
5828
- * `event.sender.sendTo(event.senderId, ...)` to reply to the message, see
5829
- * ipcRenderer.sendTo for more information. This only applies to messages sent from
5830
- * a different renderer. Messages sent directly from the main process set
5831
- * `event.senderId` to `0`.
5832
- *
5833
- * @deprecated
5834
- */
5835
- senderId: number;
5836
- /**
5837
- * Whether the message sent via ipcRenderer.sendTo was sent by the main frame. This
5838
- * is relevant when `nodeIntegrationInSubFrames` is enabled in the originating
5839
- * `webContents`.
5840
- *
5841
- * @deprecated
5842
- */
5843
- senderIsMainFrame?: boolean;
5844
6003
  }
5845
6004
 
5846
6005
  interface JumpListCategory {
@@ -5993,6 +6152,7 @@ declare namespace Electron {
5993
6152
  * Emitted when a popup is closed either manually or with `menu.closePopup()`.
5994
6153
  */
5995
6154
  on(event: 'menu-will-close', listener: (event: Event) => void): this;
6155
+ off(event: 'menu-will-close', listener: (event: Event) => void): this;
5996
6156
  once(event: 'menu-will-close', listener: (event: Event) => void): this;
5997
6157
  addListener(event: 'menu-will-close', listener: (event: Event) => void): this;
5998
6158
  removeListener(event: 'menu-will-close', listener: (event: Event) => void): this;
@@ -6000,6 +6160,7 @@ declare namespace Electron {
6000
6160
  * Emitted when `menu.popup()` is called.
6001
6161
  */
6002
6162
  on(event: 'menu-will-show', listener: (event: Event) => void): this;
6163
+ off(event: 'menu-will-show', listener: (event: Event) => void): this;
6003
6164
  once(event: 'menu-will-show', listener: (event: Event) => void): this;
6004
6165
  addListener(event: 'menu-will-show', listener: (event: Event) => void): this;
6005
6166
  removeListener(event: 'menu-will-show', listener: (event: Event) => void): this;
@@ -6230,6 +6391,7 @@ declare namespace Electron {
6230
6391
  * Emitted when the remote end of a MessagePortMain object becomes disconnected.
6231
6392
  */
6232
6393
  on(event: 'close', listener: Function): this;
6394
+ off(event: 'close', listener: Function): this;
6233
6395
  once(event: 'close', listener: Function): this;
6234
6396
  addListener(event: 'close', listener: Function): this;
6235
6397
  removeListener(event: 'close', listener: Function): this;
@@ -6237,6 +6399,7 @@ declare namespace Electron {
6237
6399
  * Emitted when a MessagePortMain object receives a message.
6238
6400
  */
6239
6401
  on(event: 'message', listener: (messageEvent: MessageEvent) => void): this;
6402
+ off(event: 'message', listener: (messageEvent: MessageEvent) => void): this;
6240
6403
  once(event: 'message', listener: (messageEvent: MessageEvent) => void): this;
6241
6404
  addListener(event: 'message', listener: (messageEvent: MessageEvent) => void): this;
6242
6405
  removeListener(event: 'message', listener: (messageEvent: MessageEvent) => void): this;
@@ -6486,6 +6649,7 @@ declare namespace Electron {
6486
6649
  * will have to check them to determine which one has changed.
6487
6650
  */
6488
6651
  on(event: 'updated', listener: Function): this;
6652
+ off(event: 'updated', listener: Function): this;
6489
6653
  once(event: 'updated', listener: Function): this;
6490
6654
  addListener(event: 'updated', listener: Function): this;
6491
6655
  removeListener(event: 'updated', listener: Function): this;
@@ -6662,6 +6826,11 @@ declare namespace Electron {
6662
6826
  * The index of the action that was activated.
6663
6827
  */
6664
6828
  index: number) => void): this;
6829
+ off(event: 'action', listener: (event: Event,
6830
+ /**
6831
+ * The index of the action that was activated.
6832
+ */
6833
+ index: number) => void): this;
6665
6834
  once(event: 'action', listener: (event: Event,
6666
6835
  /**
6667
6836
  * The index of the action that was activated.
@@ -6681,6 +6850,7 @@ declare namespace Electron {
6681
6850
  * Emitted when the notification is clicked by the user.
6682
6851
  */
6683
6852
  on(event: 'click', listener: (event: Event) => void): this;
6853
+ off(event: 'click', listener: (event: Event) => void): this;
6684
6854
  once(event: 'click', listener: (event: Event) => void): this;
6685
6855
  addListener(event: 'click', listener: (event: Event) => void): this;
6686
6856
  removeListener(event: 'click', listener: (event: Event) => void): this;
@@ -6691,6 +6861,7 @@ declare namespace Electron {
6691
6861
  * is closed.
6692
6862
  */
6693
6863
  on(event: 'close', listener: (event: Event) => void): this;
6864
+ off(event: 'close', listener: (event: Event) => void): this;
6694
6865
  once(event: 'close', listener: (event: Event) => void): this;
6695
6866
  addListener(event: 'close', listener: (event: Event) => void): this;
6696
6867
  removeListener(event: 'close', listener: (event: Event) => void): this;
@@ -6705,6 +6876,11 @@ declare namespace Electron {
6705
6876
  * The error encountered during execution of the `show()` method.
6706
6877
  */
6707
6878
  error: string) => void): this;
6879
+ off(event: 'failed', listener: (event: Event,
6880
+ /**
6881
+ * The error encountered during execution of the `show()` method.
6882
+ */
6883
+ error: string) => void): this;
6708
6884
  once(event: 'failed', listener: (event: Event,
6709
6885
  /**
6710
6886
  * The error encountered during execution of the `show()` method.
@@ -6731,6 +6907,11 @@ declare namespace Electron {
6731
6907
  * The string the user entered into the inline reply field.
6732
6908
  */
6733
6909
  reply: string) => void): this;
6910
+ off(event: 'reply', listener: (event: Event,
6911
+ /**
6912
+ * The string the user entered into the inline reply field.
6913
+ */
6914
+ reply: string) => void): this;
6734
6915
  once(event: 'reply', listener: (event: Event,
6735
6916
  /**
6736
6917
  * The string the user entered into the inline reply field.
@@ -6752,6 +6933,7 @@ declare namespace Electron {
6752
6933
  * `show()` method.
6753
6934
  */
6754
6935
  on(event: 'show', listener: (event: Event) => void): this;
6936
+ off(event: 'show', listener: (event: Event) => void): this;
6755
6937
  once(event: 'show', listener: (event: Event) => void): this;
6756
6938
  addListener(event: 'show', listener: (event: Event) => void): this;
6757
6939
  removeListener(event: 'show', listener: (event: Event) => void): this;
@@ -6888,6 +7070,7 @@ declare namespace Electron {
6888
7070
  * be queued up until a handler is registered for this event.
6889
7071
  */
6890
7072
  on(event: 'message', listener: (messageEvent: MessageEvent) => void): this;
7073
+ off(event: 'message', listener: (messageEvent: MessageEvent) => void): this;
6891
7074
  once(event: 'message', listener: (messageEvent: MessageEvent) => void): this;
6892
7075
  addListener(event: 'message', listener: (messageEvent: MessageEvent) => void): this;
6893
7076
  removeListener(event: 'message', listener: (messageEvent: MessageEvent) => void): this;
@@ -6964,6 +7147,7 @@ declare namespace Electron {
6964
7147
  * @platform darwin,win32
6965
7148
  */
6966
7149
  on(event: 'lock-screen', listener: Function): this;
7150
+ off(event: 'lock-screen', listener: Function): this;
6967
7151
  once(event: 'lock-screen', listener: Function): this;
6968
7152
  addListener(event: 'lock-screen', listener: Function): this;
6969
7153
  removeListener(event: 'lock-screen', listener: Function): this;
@@ -6973,6 +7157,7 @@ declare namespace Electron {
6973
7157
  * @platform darwin,win32
6974
7158
  */
6975
7159
  on(event: 'on-ac', listener: Function): this;
7160
+ off(event: 'on-ac', listener: Function): this;
6976
7161
  once(event: 'on-ac', listener: Function): this;
6977
7162
  addListener(event: 'on-ac', listener: Function): this;
6978
7163
  removeListener(event: 'on-ac', listener: Function): this;
@@ -6982,6 +7167,7 @@ declare namespace Electron {
6982
7167
  * @platform darwin
6983
7168
  */
6984
7169
  on(event: 'on-battery', listener: Function): this;
7170
+ off(event: 'on-battery', listener: Function): this;
6985
7171
  once(event: 'on-battery', listener: Function): this;
6986
7172
  addListener(event: 'on-battery', listener: Function): this;
6987
7173
  removeListener(event: 'on-battery', listener: Function): this;
@@ -6989,6 +7175,7 @@ declare namespace Electron {
6989
7175
  * Emitted when system is resuming.
6990
7176
  */
6991
7177
  on(event: 'resume', listener: Function): this;
7178
+ off(event: 'resume', listener: Function): this;
6992
7179
  once(event: 'resume', listener: Function): this;
6993
7180
  addListener(event: 'resume', listener: Function): this;
6994
7181
  removeListener(event: 'resume', listener: Function): this;
@@ -7001,6 +7188,7 @@ declare namespace Electron {
7001
7188
  * @platform linux,darwin
7002
7189
  */
7003
7190
  on(event: 'shutdown', listener: Function): this;
7191
+ off(event: 'shutdown', listener: Function): this;
7004
7192
  once(event: 'shutdown', listener: Function): this;
7005
7193
  addListener(event: 'shutdown', listener: Function): this;
7006
7194
  removeListener(event: 'shutdown', listener: Function): this;
@@ -7012,6 +7200,7 @@ declare namespace Electron {
7012
7200
  * @platform darwin,win32
7013
7201
  */
7014
7202
  on(event: 'speed-limit-change', listener: Function): this;
7203
+ off(event: 'speed-limit-change', listener: Function): this;
7015
7204
  once(event: 'speed-limit-change', listener: Function): this;
7016
7205
  addListener(event: 'speed-limit-change', listener: Function): this;
7017
7206
  removeListener(event: 'speed-limit-change', listener: Function): this;
@@ -7019,6 +7208,7 @@ declare namespace Electron {
7019
7208
  * Emitted when the system is suspending.
7020
7209
  */
7021
7210
  on(event: 'suspend', listener: Function): this;
7211
+ off(event: 'suspend', listener: Function): this;
7022
7212
  once(event: 'suspend', listener: Function): this;
7023
7213
  addListener(event: 'suspend', listener: Function): this;
7024
7214
  removeListener(event: 'suspend', listener: Function): this;
@@ -7039,6 +7229,7 @@ declare namespace Electron {
7039
7229
  * @platform darwin
7040
7230
  */
7041
7231
  on(event: 'thermal-state-change', listener: Function): this;
7232
+ off(event: 'thermal-state-change', listener: Function): this;
7042
7233
  once(event: 'thermal-state-change', listener: Function): this;
7043
7234
  addListener(event: 'thermal-state-change', listener: Function): this;
7044
7235
  removeListener(event: 'thermal-state-change', listener: Function): this;
@@ -7048,6 +7239,7 @@ declare namespace Electron {
7048
7239
  * @platform darwin,win32
7049
7240
  */
7050
7241
  on(event: 'unlock-screen', listener: Function): this;
7242
+ off(event: 'unlock-screen', listener: Function): this;
7051
7243
  once(event: 'unlock-screen', listener: Function): this;
7052
7244
  addListener(event: 'unlock-screen', listener: Function): this;
7053
7245
  removeListener(event: 'unlock-screen', listener: Function): this;
@@ -7058,6 +7250,7 @@ declare namespace Electron {
7058
7250
  * @platform darwin
7059
7251
  */
7060
7252
  on(event: 'user-did-become-active', listener: Function): this;
7253
+ off(event: 'user-did-become-active', listener: Function): this;
7061
7254
  once(event: 'user-did-become-active', listener: Function): this;
7062
7255
  addListener(event: 'user-did-become-active', listener: Function): this;
7063
7256
  removeListener(event: 'user-did-become-active', listener: Function): this;
@@ -7068,6 +7261,7 @@ declare namespace Electron {
7068
7261
  * @platform darwin
7069
7262
  */
7070
7263
  on(event: 'user-did-resign-active', listener: Function): this;
7264
+ off(event: 'user-did-resign-active', listener: Function): this;
7071
7265
  once(event: 'user-did-resign-active', listener: Function): this;
7072
7266
  addListener(event: 'user-did-resign-active', listener: Function): this;
7073
7267
  removeListener(event: 'user-did-resign-active', listener: Function): this;
@@ -7663,6 +7857,8 @@ declare namespace Electron {
7663
7857
  */
7664
7858
  on(event: 'received-apns-notification', listener: (event: Event,
7665
7859
  userInfo: Record<string, any>) => void): this;
7860
+ off(event: 'received-apns-notification', listener: (event: Event,
7861
+ userInfo: Record<string, any>) => void): this;
7666
7862
  once(event: 'received-apns-notification', listener: (event: Event,
7667
7863
  userInfo: Record<string, any>) => void): this;
7668
7864
  addListener(event: 'received-apns-notification', listener: (event: Event,
@@ -7826,6 +8022,8 @@ declare namespace Electron {
7826
8022
  */
7827
8023
  on(event: 'display-added', listener: (event: Event,
7828
8024
  newDisplay: Display) => void): this;
8025
+ off(event: 'display-added', listener: (event: Event,
8026
+ newDisplay: Display) => void): this;
7829
8027
  once(event: 'display-added', listener: (event: Event,
7830
8028
  newDisplay: Display) => void): this;
7831
8029
  addListener(event: 'display-added', listener: (event: Event,
@@ -7840,6 +8038,9 @@ declare namespace Electron {
7840
8038
  on(event: 'display-metrics-changed', listener: (event: Event,
7841
8039
  display: Display,
7842
8040
  changedMetrics: string[]) => void): this;
8041
+ off(event: 'display-metrics-changed', listener: (event: Event,
8042
+ display: Display,
8043
+ changedMetrics: string[]) => void): this;
7843
8044
  once(event: 'display-metrics-changed', listener: (event: Event,
7844
8045
  display: Display,
7845
8046
  changedMetrics: string[]) => void): this;
@@ -7854,6 +8055,8 @@ declare namespace Electron {
7854
8055
  */
7855
8056
  on(event: 'display-removed', listener: (event: Event,
7856
8057
  oldDisplay: Display) => void): this;
8058
+ off(event: 'display-removed', listener: (event: Event,
8059
+ oldDisplay: Display) => void): this;
7857
8060
  once(event: 'display-removed', listener: (event: Event,
7858
8061
  oldDisplay: Display) => void): this;
7859
8062
  addListener(event: 'display-removed', listener: (event: Event,
@@ -8020,6 +8223,11 @@ declare namespace Electron {
8020
8223
  * Information about the console message
8021
8224
  */
8022
8225
  messageDetails: MessageDetails) => void): this;
8226
+ off(event: 'console-message', listener: (event: Event,
8227
+ /**
8228
+ * Information about the console message
8229
+ */
8230
+ messageDetails: MessageDetails) => void): this;
8023
8231
  once(event: 'console-message', listener: (event: Event,
8024
8232
  /**
8025
8233
  * Information about the console message
@@ -8045,7 +8253,12 @@ declare namespace Electron {
8045
8253
  * Information about the registered service worker
8046
8254
  */
8047
8255
  details: RegistrationCompletedDetails) => void): this;
8048
- once(event: 'registration-completed', listener: (event: Event,
8256
+ off(event: 'registration-completed', listener: (event: Event,
8257
+ /**
8258
+ * Information about the registered service worker
8259
+ */
8260
+ details: RegistrationCompletedDetails) => void): this;
8261
+ once(event: 'registration-completed', listener: (event: Event,
8049
8262
  /**
8050
8263
  * Information about the registered service worker
8051
8264
  */
@@ -8120,6 +8333,8 @@ declare namespace Electron {
8120
8333
  */
8121
8334
  on(event: 'extension-loaded', listener: (event: Event,
8122
8335
  extension: Extension) => void): this;
8336
+ off(event: 'extension-loaded', listener: (event: Event,
8337
+ extension: Extension) => void): this;
8123
8338
  once(event: 'extension-loaded', listener: (event: Event,
8124
8339
  extension: Extension) => void): this;
8125
8340
  addListener(event: 'extension-loaded', listener: (event: Event,
@@ -8132,6 +8347,8 @@ declare namespace Electron {
8132
8347
  */
8133
8348
  on(event: 'extension-ready', listener: (event: Event,
8134
8349
  extension: Extension) => void): this;
8350
+ off(event: 'extension-ready', listener: (event: Event,
8351
+ extension: Extension) => void): this;
8135
8352
  once(event: 'extension-ready', listener: (event: Event,
8136
8353
  extension: Extension) => void): this;
8137
8354
  addListener(event: 'extension-ready', listener: (event: Event,
@@ -8144,6 +8361,8 @@ declare namespace Electron {
8144
8361
  */
8145
8362
  on(event: 'extension-unloaded', listener: (event: Event,
8146
8363
  extension: Extension) => void): this;
8364
+ off(event: 'extension-unloaded', listener: (event: Event,
8365
+ extension: Extension) => void): this;
8147
8366
  once(event: 'extension-unloaded', listener: (event: Event,
8148
8367
  extension: Extension) => void): this;
8149
8368
  addListener(event: 'extension-unloaded', listener: (event: Event,
@@ -8159,6 +8378,8 @@ declare namespace Electron {
8159
8378
  */
8160
8379
  on(event: 'hid-device-added', listener: (event: Event,
8161
8380
  details: HidDeviceAddedDetails) => void): this;
8381
+ off(event: 'hid-device-added', listener: (event: Event,
8382
+ details: HidDeviceAddedDetails) => void): this;
8162
8383
  once(event: 'hid-device-added', listener: (event: Event,
8163
8384
  details: HidDeviceAddedDetails) => void): this;
8164
8385
  addListener(event: 'hid-device-added', listener: (event: Event,
@@ -8174,6 +8395,8 @@ declare namespace Electron {
8174
8395
  */
8175
8396
  on(event: 'hid-device-removed', listener: (event: Event,
8176
8397
  details: HidDeviceRemovedDetails) => void): this;
8398
+ off(event: 'hid-device-removed', listener: (event: Event,
8399
+ details: HidDeviceRemovedDetails) => void): this;
8177
8400
  once(event: 'hid-device-removed', listener: (event: Event,
8178
8401
  details: HidDeviceRemovedDetails) => void): this;
8179
8402
  addListener(event: 'hid-device-removed', listener: (event: Event,
@@ -8187,6 +8410,8 @@ declare namespace Electron {
8187
8410
  */
8188
8411
  on(event: 'hid-device-revoked', listener: (event: Event,
8189
8412
  details: HidDeviceRevokedDetails) => void): this;
8413
+ off(event: 'hid-device-revoked', listener: (event: Event,
8414
+ details: HidDeviceRevokedDetails) => void): this;
8190
8415
  once(event: 'hid-device-revoked', listener: (event: Event,
8191
8416
  details: HidDeviceRevokedDetails) => void): this;
8192
8417
  addListener(event: 'hid-device-revoked', listener: (event: Event,
@@ -8207,6 +8432,16 @@ declare namespace Electron {
8207
8432
  * the spec for more details.)
8208
8433
  */
8209
8434
  allowCredentials: boolean) => void): this;
8435
+ off(event: 'preconnect', listener: (event: Event,
8436
+ /**
8437
+ * The URL being requested for preconnection by the renderer.
8438
+ */
8439
+ preconnectUrl: string,
8440
+ /**
8441
+ * True if the renderer is requesting that the connection include credentials (see
8442
+ * the spec for more details.)
8443
+ */
8444
+ allowCredentials: boolean) => void): this;
8210
8445
  once(event: 'preconnect', listener: (event: Event,
8211
8446
  /**
8212
8447
  * The URL being requested for preconnection by the renderer.
@@ -8248,6 +8483,9 @@ declare namespace Electron {
8248
8483
  on(event: 'select-hid-device', listener: (event: Event,
8249
8484
  details: SelectHidDeviceDetails,
8250
8485
  callback: (deviceId?: (string) | (null)) => void) => void): this;
8486
+ off(event: 'select-hid-device', listener: (event: Event,
8487
+ details: SelectHidDeviceDetails,
8488
+ callback: (deviceId?: (string) | (null)) => void) => void): this;
8251
8489
  once(event: 'select-hid-device', listener: (event: Event,
8252
8490
  details: SelectHidDeviceDetails,
8253
8491
  callback: (deviceId?: (string) | (null)) => void) => void): this;
@@ -8268,6 +8506,10 @@ declare namespace Electron {
8268
8506
  portList: SerialPort[],
8269
8507
  webContents: WebContents,
8270
8508
  callback: (portId: string) => void) => void): this;
8509
+ off(event: 'select-serial-port', listener: (event: Event,
8510
+ portList: SerialPort[],
8511
+ webContents: WebContents,
8512
+ callback: (portId: string) => void) => void): this;
8271
8513
  once(event: 'select-serial-port', listener: (event: Event,
8272
8514
  portList: SerialPort[],
8273
8515
  webContents: WebContents,
@@ -8291,6 +8533,9 @@ declare namespace Electron {
8291
8533
  on(event: 'select-usb-device', listener: (event: Event,
8292
8534
  details: SelectUsbDeviceDetails,
8293
8535
  callback: (deviceId?: string) => void) => void): this;
8536
+ off(event: 'select-usb-device', listener: (event: Event,
8537
+ details: SelectUsbDeviceDetails,
8538
+ callback: (deviceId?: string) => void) => void): this;
8294
8539
  once(event: 'select-usb-device', listener: (event: Event,
8295
8540
  details: SelectUsbDeviceDetails,
8296
8541
  callback: (deviceId?: string) => void) => void): this;
@@ -8310,6 +8555,9 @@ declare namespace Electron {
8310
8555
  on(event: 'serial-port-added', listener: (event: Event,
8311
8556
  port: SerialPort,
8312
8557
  webContents: WebContents) => void): this;
8558
+ off(event: 'serial-port-added', listener: (event: Event,
8559
+ port: SerialPort,
8560
+ webContents: WebContents) => void): this;
8313
8561
  once(event: 'serial-port-added', listener: (event: Event,
8314
8562
  port: SerialPort,
8315
8563
  webContents: WebContents) => void): this;
@@ -8329,6 +8577,9 @@ declare namespace Electron {
8329
8577
  on(event: 'serial-port-removed', listener: (event: Event,
8330
8578
  port: SerialPort,
8331
8579
  webContents: WebContents) => void): this;
8580
+ off(event: 'serial-port-removed', listener: (event: Event,
8581
+ port: SerialPort,
8582
+ webContents: WebContents) => void): this;
8332
8583
  once(event: 'serial-port-removed', listener: (event: Event,
8333
8584
  port: SerialPort,
8334
8585
  webContents: WebContents) => void): this;
@@ -8345,6 +8596,8 @@ declare namespace Electron {
8345
8596
  */
8346
8597
  on(event: 'serial-port-revoked', listener: (event: Event,
8347
8598
  details: SerialPortRevokedDetails) => void): this;
8599
+ off(event: 'serial-port-revoked', listener: (event: Event,
8600
+ details: SerialPortRevokedDetails) => void): this;
8348
8601
  once(event: 'serial-port-revoked', listener: (event: Event,
8349
8602
  details: SerialPortRevokedDetails) => void): this;
8350
8603
  addListener(event: 'serial-port-revoked', listener: (event: Event,
@@ -8359,6 +8612,11 @@ declare namespace Electron {
8359
8612
  * The language code of the dictionary file
8360
8613
  */
8361
8614
  languageCode: string) => void): this;
8615
+ off(event: 'spellcheck-dictionary-download-begin', listener: (event: Event,
8616
+ /**
8617
+ * The language code of the dictionary file
8618
+ */
8619
+ languageCode: string) => void): this;
8362
8620
  once(event: 'spellcheck-dictionary-download-begin', listener: (event: Event,
8363
8621
  /**
8364
8622
  * The language code of the dictionary file
@@ -8383,6 +8641,11 @@ declare namespace Electron {
8383
8641
  * The language code of the dictionary file
8384
8642
  */
8385
8643
  languageCode: string) => void): this;
8644
+ off(event: 'spellcheck-dictionary-download-failure', listener: (event: Event,
8645
+ /**
8646
+ * The language code of the dictionary file
8647
+ */
8648
+ languageCode: string) => void): this;
8386
8649
  once(event: 'spellcheck-dictionary-download-failure', listener: (event: Event,
8387
8650
  /**
8388
8651
  * The language code of the dictionary file
@@ -8406,6 +8669,11 @@ declare namespace Electron {
8406
8669
  * The language code of the dictionary file
8407
8670
  */
8408
8671
  languageCode: string) => void): this;
8672
+ off(event: 'spellcheck-dictionary-download-success', listener: (event: Event,
8673
+ /**
8674
+ * The language code of the dictionary file
8675
+ */
8676
+ languageCode: string) => void): this;
8409
8677
  once(event: 'spellcheck-dictionary-download-success', listener: (event: Event,
8410
8678
  /**
8411
8679
  * The language code of the dictionary file
@@ -8430,6 +8698,11 @@ declare namespace Electron {
8430
8698
  * The language code of the dictionary file
8431
8699
  */
8432
8700
  languageCode: string) => void): this;
8701
+ off(event: 'spellcheck-dictionary-initialized', listener: (event: Event,
8702
+ /**
8703
+ * The language code of the dictionary file
8704
+ */
8705
+ languageCode: string) => void): this;
8433
8706
  once(event: 'spellcheck-dictionary-initialized', listener: (event: Event,
8434
8707
  /**
8435
8708
  * The language code of the dictionary file
@@ -8455,6 +8728,9 @@ declare namespace Electron {
8455
8728
  on(event: 'usb-device-added', listener: (event: Event,
8456
8729
  device: USBDevice,
8457
8730
  webContents: WebContents) => void): this;
8731
+ off(event: 'usb-device-added', listener: (event: Event,
8732
+ device: USBDevice,
8733
+ webContents: WebContents) => void): this;
8458
8734
  once(event: 'usb-device-added', listener: (event: Event,
8459
8735
  device: USBDevice,
8460
8736
  webContents: WebContents) => void): this;
@@ -8474,6 +8750,9 @@ declare namespace Electron {
8474
8750
  on(event: 'usb-device-removed', listener: (event: Event,
8475
8751
  device: USBDevice,
8476
8752
  webContents: WebContents) => void): this;
8753
+ off(event: 'usb-device-removed', listener: (event: Event,
8754
+ device: USBDevice,
8755
+ webContents: WebContents) => void): this;
8477
8756
  once(event: 'usb-device-removed', listener: (event: Event,
8478
8757
  device: USBDevice,
8479
8758
  webContents: WebContents) => void): this;
@@ -8490,6 +8769,8 @@ declare namespace Electron {
8490
8769
  */
8491
8770
  on(event: 'usb-device-revoked', listener: (event: Event,
8492
8771
  details: UsbDeviceRevokedDetails) => void): this;
8772
+ off(event: 'usb-device-revoked', listener: (event: Event,
8773
+ details: UsbDeviceRevokedDetails) => void): this;
8493
8774
  once(event: 'usb-device-revoked', listener: (event: Event,
8494
8775
  details: UsbDeviceRevokedDetails) => void): this;
8495
8776
  addListener(event: 'usb-device-revoked', listener: (event: Event,
@@ -8505,6 +8786,9 @@ declare namespace Electron {
8505
8786
  on(event: 'will-download', listener: (event: Event,
8506
8787
  item: DownloadItem,
8507
8788
  webContents: WebContents) => void): this;
8789
+ off(event: 'will-download', listener: (event: Event,
8790
+ item: DownloadItem,
8791
+ webContents: WebContents) => void): this;
8508
8792
  once(event: 'will-download', listener: (event: Event,
8509
8793
  item: DownloadItem,
8510
8794
  webContents: WebContents) => void): this;
@@ -8775,7 +9059,7 @@ declare namespace Electron {
8775
9059
  * `navigator.hid.requestDevice`). If this handler is not defined, the default
8776
9060
  * device permissions as granted through device selection (eg via
8777
9061
  * `navigator.hid.requestDevice`) will be used. Additionally, the default behavior
8778
- * of Electron is to store granted device permision in memory. If longer term
9062
+ * of Electron is to store granted device permission in memory. If longer term
8779
9063
  * storage is needed, a developer can store granted device permissions (eg when
8780
9064
  * handling the `select-hid-device` event) and then read from that storage with
8781
9065
  * `setDevicePermissionHandler`.
@@ -9165,6 +9449,11 @@ declare namespace Electron {
9165
9449
  * The new RGBA color the user assigned to be their system accent color.
9166
9450
  */
9167
9451
  newColor: string) => void): this;
9452
+ off(event: 'accent-color-changed', listener: (event: Event,
9453
+ /**
9454
+ * The new RGBA color the user assigned to be their system accent color.
9455
+ */
9456
+ newColor: string) => void): this;
9168
9457
  once(event: 'accent-color-changed', listener: (event: Event,
9169
9458
  /**
9170
9459
  * The new RGBA color the user assigned to be their system accent color.
@@ -9184,6 +9473,7 @@ declare namespace Electron {
9184
9473
  * @platform win32
9185
9474
  */
9186
9475
  on(event: 'color-changed', listener: (event: Event) => void): this;
9476
+ off(event: 'color-changed', listener: (event: Event) => void): this;
9187
9477
  once(event: 'color-changed', listener: (event: Event) => void): this;
9188
9478
  addListener(event: 'color-changed', listener: (event: Event) => void): this;
9189
9479
  removeListener(event: 'color-changed', listener: (event: Event) => void): this;
@@ -9236,7 +9526,7 @@ declare namespace Electron {
9236
9526
  */
9237
9527
  getAnimationSettings(): AnimationSettings;
9238
9528
  /**
9239
- * The system color setting in RGB hexadecimal form (`#ABCDEF`). See the Windows
9529
+ * The system color setting in RGBA hexadecimal form (`#RRGGBBAA`). See the Windows
9240
9530
  * docs and the macOS docs for more details.
9241
9531
  *
9242
9532
  * The following colors are only available on macOS 10.14: `find-highlight`,
@@ -9451,6 +9741,14 @@ declare namespace Electron {
9451
9741
  * @platform darwin
9452
9742
  */
9453
9743
  unsubscribeWorkspaceNotification(id: number): void;
9744
+ /**
9745
+ * A `boolean` property which determines whether the app avoids using
9746
+ * semitransparent backgrounds. This maps to
9747
+ * NSWorkspace.accessibilityDisplayShouldReduceTransparency
9748
+ *
9749
+ * @platform darwin
9750
+ */
9751
+ accessibilityDisplayShouldReduceTransparency(): boolean;
9454
9752
  /**
9455
9753
  * A `string` property that can be `dark`, `light` or `unknown`.
9456
9754
  *
@@ -9956,6 +10254,7 @@ declare namespace Electron {
9956
10254
  * @platform win32
9957
10255
  */
9958
10256
  on(event: 'balloon-click', listener: Function): this;
10257
+ off(event: 'balloon-click', listener: Function): this;
9959
10258
  once(event: 'balloon-click', listener: Function): this;
9960
10259
  addListener(event: 'balloon-click', listener: Function): this;
9961
10260
  removeListener(event: 'balloon-click', listener: Function): this;
@@ -9966,6 +10265,7 @@ declare namespace Electron {
9966
10265
  * @platform win32
9967
10266
  */
9968
10267
  on(event: 'balloon-closed', listener: Function): this;
10268
+ off(event: 'balloon-closed', listener: Function): this;
9969
10269
  once(event: 'balloon-closed', listener: Function): this;
9970
10270
  addListener(event: 'balloon-closed', listener: Function): this;
9971
10271
  removeListener(event: 'balloon-closed', listener: Function): this;
@@ -9975,6 +10275,7 @@ declare namespace Electron {
9975
10275
  * @platform win32
9976
10276
  */
9977
10277
  on(event: 'balloon-show', listener: Function): this;
10278
+ off(event: 'balloon-show', listener: Function): this;
9978
10279
  once(event: 'balloon-show', listener: Function): this;
9979
10280
  addListener(event: 'balloon-show', listener: Function): this;
9980
10281
  removeListener(event: 'balloon-show', listener: Function): this;
@@ -9993,6 +10294,15 @@ declare namespace Electron {
9993
10294
  * The position of the event.
9994
10295
  */
9995
10296
  position: Point) => void): this;
10297
+ off(event: 'click', listener: (event: KeyboardEvent,
10298
+ /**
10299
+ * The bounds of tray icon.
10300
+ */
10301
+ bounds: Rectangle,
10302
+ /**
10303
+ * The position of the event.
10304
+ */
10305
+ position: Point) => void): this;
9996
10306
  once(event: 'click', listener: (event: KeyboardEvent,
9997
10307
  /**
9998
10308
  * The bounds of tray icon.
@@ -10030,6 +10340,11 @@ declare namespace Electron {
10030
10340
  * The bounds of tray icon.
10031
10341
  */
10032
10342
  bounds: Rectangle) => void): this;
10343
+ off(event: 'double-click', listener: (event: KeyboardEvent,
10344
+ /**
10345
+ * The bounds of tray icon.
10346
+ */
10347
+ bounds: Rectangle) => void): this;
10033
10348
  once(event: 'double-click', listener: (event: KeyboardEvent,
10034
10349
  /**
10035
10350
  * The bounds of tray icon.
@@ -10051,6 +10366,7 @@ declare namespace Electron {
10051
10366
  * @platform darwin
10052
10367
  */
10053
10368
  on(event: 'drag-end', listener: Function): this;
10369
+ off(event: 'drag-end', listener: Function): this;
10054
10370
  once(event: 'drag-end', listener: Function): this;
10055
10371
  addListener(event: 'drag-end', listener: Function): this;
10056
10372
  removeListener(event: 'drag-end', listener: Function): this;
@@ -10060,6 +10376,7 @@ declare namespace Electron {
10060
10376
  * @platform darwin
10061
10377
  */
10062
10378
  on(event: 'drag-enter', listener: Function): this;
10379
+ off(event: 'drag-enter', listener: Function): this;
10063
10380
  once(event: 'drag-enter', listener: Function): this;
10064
10381
  addListener(event: 'drag-enter', listener: Function): this;
10065
10382
  removeListener(event: 'drag-enter', listener: Function): this;
@@ -10069,6 +10386,7 @@ declare namespace Electron {
10069
10386
  * @platform darwin
10070
10387
  */
10071
10388
  on(event: 'drag-leave', listener: Function): this;
10389
+ off(event: 'drag-leave', listener: Function): this;
10072
10390
  once(event: 'drag-leave', listener: Function): this;
10073
10391
  addListener(event: 'drag-leave', listener: Function): this;
10074
10392
  removeListener(event: 'drag-leave', listener: Function): this;
@@ -10078,6 +10396,7 @@ declare namespace Electron {
10078
10396
  * @platform darwin
10079
10397
  */
10080
10398
  on(event: 'drop', listener: Function): this;
10399
+ off(event: 'drop', listener: Function): this;
10081
10400
  once(event: 'drop', listener: Function): this;
10082
10401
  addListener(event: 'drop', listener: Function): this;
10083
10402
  removeListener(event: 'drop', listener: Function): this;
@@ -10091,6 +10410,11 @@ declare namespace Electron {
10091
10410
  * The paths of the dropped files.
10092
10411
  */
10093
10412
  files: string[]) => void): this;
10413
+ off(event: 'drop-files', listener: (event: Event,
10414
+ /**
10415
+ * The paths of the dropped files.
10416
+ */
10417
+ files: string[]) => void): this;
10094
10418
  once(event: 'drop-files', listener: (event: Event,
10095
10419
  /**
10096
10420
  * The paths of the dropped files.
@@ -10116,6 +10440,11 @@ declare namespace Electron {
10116
10440
  * the dropped text string.
10117
10441
  */
10118
10442
  text: string) => void): this;
10443
+ off(event: 'drop-text', listener: (event: Event,
10444
+ /**
10445
+ * the dropped text string.
10446
+ */
10447
+ text: string) => void): this;
10119
10448
  once(event: 'drop-text', listener: (event: Event,
10120
10449
  /**
10121
10450
  * the dropped text string.
@@ -10131,6 +10460,36 @@ declare namespace Electron {
10131
10460
  * the dropped text string.
10132
10461
  */
10133
10462
  text: string) => void): this;
10463
+ /**
10464
+ * Emitted when the tray icon is middle clicked.
10465
+ *
10466
+ * @platform win32
10467
+ */
10468
+ on(event: 'middle-click', listener: (event: KeyboardEvent,
10469
+ /**
10470
+ * The bounds of tray icon.
10471
+ */
10472
+ bounds: Rectangle) => void): this;
10473
+ off(event: 'middle-click', listener: (event: KeyboardEvent,
10474
+ /**
10475
+ * The bounds of tray icon.
10476
+ */
10477
+ bounds: Rectangle) => void): this;
10478
+ once(event: 'middle-click', listener: (event: KeyboardEvent,
10479
+ /**
10480
+ * The bounds of tray icon.
10481
+ */
10482
+ bounds: Rectangle) => void): this;
10483
+ addListener(event: 'middle-click', listener: (event: KeyboardEvent,
10484
+ /**
10485
+ * The bounds of tray icon.
10486
+ */
10487
+ bounds: Rectangle) => void): this;
10488
+ removeListener(event: 'middle-click', listener: (event: KeyboardEvent,
10489
+ /**
10490
+ * The bounds of tray icon.
10491
+ */
10492
+ bounds: Rectangle) => void): this;
10134
10493
  /**
10135
10494
  * Emitted when the mouse clicks the tray icon.
10136
10495
  *
@@ -10141,6 +10500,11 @@ declare namespace Electron {
10141
10500
  * The position of the event.
10142
10501
  */
10143
10502
  position: Point) => void): this;
10503
+ off(event: 'mouse-down', listener: (event: KeyboardEvent,
10504
+ /**
10505
+ * The position of the event.
10506
+ */
10507
+ position: Point) => void): this;
10144
10508
  once(event: 'mouse-down', listener: (event: KeyboardEvent,
10145
10509
  /**
10146
10510
  * The position of the event.
@@ -10159,13 +10523,18 @@ declare namespace Electron {
10159
10523
  /**
10160
10524
  * Emitted when the mouse enters the tray icon.
10161
10525
  *
10162
- * @platform darwin
10526
+ * @platform darwin,win32
10163
10527
  */
10164
10528
  on(event: 'mouse-enter', listener: (event: KeyboardEvent,
10165
10529
  /**
10166
10530
  * The position of the event.
10167
10531
  */
10168
10532
  position: Point) => void): this;
10533
+ off(event: 'mouse-enter', listener: (event: KeyboardEvent,
10534
+ /**
10535
+ * The position of the event.
10536
+ */
10537
+ position: Point) => void): this;
10169
10538
  once(event: 'mouse-enter', listener: (event: KeyboardEvent,
10170
10539
  /**
10171
10540
  * The position of the event.
@@ -10184,13 +10553,18 @@ declare namespace Electron {
10184
10553
  /**
10185
10554
  * Emitted when the mouse exits the tray icon.
10186
10555
  *
10187
- * @platform darwin
10556
+ * @platform darwin,win32
10188
10557
  */
10189
10558
  on(event: 'mouse-leave', listener: (event: KeyboardEvent,
10190
10559
  /**
10191
10560
  * The position of the event.
10192
10561
  */
10193
10562
  position: Point) => void): this;
10563
+ off(event: 'mouse-leave', listener: (event: KeyboardEvent,
10564
+ /**
10565
+ * The position of the event.
10566
+ */
10567
+ position: Point) => void): this;
10194
10568
  once(event: 'mouse-leave', listener: (event: KeyboardEvent,
10195
10569
  /**
10196
10570
  * The position of the event.
@@ -10216,6 +10590,11 @@ declare namespace Electron {
10216
10590
  * The position of the event.
10217
10591
  */
10218
10592
  position: Point) => void): this;
10593
+ off(event: 'mouse-move', listener: (event: KeyboardEvent,
10594
+ /**
10595
+ * The position of the event.
10596
+ */
10597
+ position: Point) => void): this;
10219
10598
  once(event: 'mouse-move', listener: (event: KeyboardEvent,
10220
10599
  /**
10221
10600
  * The position of the event.
@@ -10244,6 +10623,11 @@ declare namespace Electron {
10244
10623
  * The position of the event.
10245
10624
  */
10246
10625
  position: Point) => void): this;
10626
+ off(event: 'mouse-up', listener: (event: KeyboardEvent,
10627
+ /**
10628
+ * The position of the event.
10629
+ */
10630
+ position: Point) => void): this;
10247
10631
  once(event: 'mouse-up', listener: (event: KeyboardEvent,
10248
10632
  /**
10249
10633
  * The position of the event.
@@ -10269,6 +10653,11 @@ declare namespace Electron {
10269
10653
  * The bounds of tray icon.
10270
10654
  */
10271
10655
  bounds: Rectangle) => void): this;
10656
+ off(event: 'right-click', listener: (event: KeyboardEvent,
10657
+ /**
10658
+ * The bounds of tray icon.
10659
+ */
10660
+ bounds: Rectangle) => void): this;
10272
10661
  once(event: 'right-click', listener: (event: KeyboardEvent,
10273
10662
  /**
10274
10663
  * The bounds of tray icon.
@@ -10539,6 +10928,12 @@ declare namespace Electron {
10539
10928
  * GetExitCodeProcess on windows.
10540
10929
  */
10541
10930
  code: number) => void): this;
10931
+ off(event: 'exit', listener: (
10932
+ /**
10933
+ * Contains the exit code for the process obtained from waitpid on posix, or
10934
+ * GetExitCodeProcess on windows.
10935
+ */
10936
+ code: number) => void): this;
10542
10937
  once(event: 'exit', listener: (
10543
10938
  /**
10544
10939
  * Contains the exit code for the process obtained from waitpid on posix, or
@@ -10562,6 +10957,7 @@ declare namespace Electron {
10562
10957
  * `process.parentPort.postMessage()`.
10563
10958
  */
10564
10959
  on(event: 'message', listener: (message: any) => void): this;
10960
+ off(event: 'message', listener: (message: any) => void): this;
10565
10961
  once(event: 'message', listener: (message: any) => void): this;
10566
10962
  addListener(event: 'message', listener: (message: any) => void): this;
10567
10963
  removeListener(event: 'message', listener: (message: any) => void): this;
@@ -10569,6 +10965,7 @@ declare namespace Electron {
10569
10965
  * Emitted once the child process has spawned successfully.
10570
10966
  */
10571
10967
  on(event: 'spawn', listener: Function): this;
10968
+ off(event: 'spawn', listener: Function): this;
10572
10969
  once(event: 'spawn', listener: Function): this;
10573
10970
  addListener(event: 'spawn', listener: Function): this;
10574
10971
  removeListener(event: 'spawn', listener: Function): this;
@@ -10643,6 +11040,7 @@ declare namespace Electron {
10643
11040
  * Emitted when media becomes audible or inaudible.
10644
11041
  */
10645
11042
  on(event: 'audio-state-changed', listener: (event: Event<WebContentsAudioStateChangedEventParams>) => void): this;
11043
+ off(event: 'audio-state-changed', listener: (event: Event<WebContentsAudioStateChangedEventParams>) => void): this;
10646
11044
  once(event: 'audio-state-changed', listener: (event: Event<WebContentsAudioStateChangedEventParams>) => void): this;
10647
11045
  addListener(event: 'audio-state-changed', listener: (event: Event<WebContentsAudioStateChangedEventParams>) => void): this;
10648
11046
  removeListener(event: 'audio-state-changed', listener: (event: Event<WebContentsAudioStateChangedEventParams>) => void): this;
@@ -10658,6 +11056,11 @@ declare namespace Electron {
10658
11056
  * Input properties.
10659
11057
  */
10660
11058
  input: Input) => void): this;
11059
+ off(event: 'before-input-event', listener: (event: Event,
11060
+ /**
11061
+ * Input properties.
11062
+ */
11063
+ input: Input) => void): this;
10661
11064
  once(event: 'before-input-event', listener: (event: Event,
10662
11065
  /**
10663
11066
  * Input properties.
@@ -10677,6 +11080,7 @@ declare namespace Electron {
10677
11080
  * Emitted when the `WebContents` loses focus.
10678
11081
  */
10679
11082
  on(event: 'blur', listener: Function): this;
11083
+ off(event: 'blur', listener: Function): this;
10680
11084
  once(event: 'blur', listener: Function): this;
10681
11085
  addListener(event: 'blur', listener: Function): this;
10682
11086
  removeListener(event: 'blur', listener: Function): this;
@@ -10694,6 +11098,15 @@ declare namespace Electron {
10694
11098
  certificate: Certificate,
10695
11099
  callback: (isTrusted: boolean) => void,
10696
11100
  isMainFrame: boolean) => void): this;
11101
+ off(event: 'certificate-error', listener: (event: Event,
11102
+ url: string,
11103
+ /**
11104
+ * The error code.
11105
+ */
11106
+ error: string,
11107
+ certificate: Certificate,
11108
+ callback: (isTrusted: boolean) => void,
11109
+ isMainFrame: boolean) => void): this;
10697
11110
  once(event: 'certificate-error', listener: (event: Event,
10698
11111
  url: string,
10699
11112
  /**
@@ -10739,6 +11152,21 @@ declare namespace Electron {
10739
11152
  */
10740
11153
  line: number,
10741
11154
  sourceId: string) => void): this;
11155
+ off(event: 'console-message', listener: (event: Event,
11156
+ /**
11157
+ * The log level, from 0 to 3. In order it matches `verbose`, `info`, `warning` and
11158
+ * `error`.
11159
+ */
11160
+ level: number,
11161
+ /**
11162
+ * The actual console message
11163
+ */
11164
+ message: string,
11165
+ /**
11166
+ * The line number of the source that triggered this console message
11167
+ */
11168
+ line: number,
11169
+ sourceId: string) => void): this;
10742
11170
  once(event: 'console-message', listener: (event: Event,
10743
11171
  /**
10744
11172
  * The log level, from 0 to 3. In order it matches `verbose`, `info`, `warning` and
@@ -10795,6 +11223,11 @@ declare namespace Electron {
10795
11223
  * requested new content bounds
10796
11224
  */
10797
11225
  bounds: Rectangle) => void): this;
11226
+ off(event: 'content-bounds-updated', listener: (event: Event,
11227
+ /**
11228
+ * requested new content bounds
11229
+ */
11230
+ bounds: Rectangle) => void): this;
10798
11231
  once(event: 'content-bounds-updated', listener: (event: Event,
10799
11232
  /**
10800
11233
  * requested new content bounds
@@ -10815,6 +11248,8 @@ declare namespace Electron {
10815
11248
  */
10816
11249
  on(event: 'context-menu', listener: (event: Event,
10817
11250
  params: ContextMenuParams) => void): this;
11251
+ off(event: 'context-menu', listener: (event: Event,
11252
+ params: ContextMenuParams) => void): this;
10818
11253
  once(event: 'context-menu', listener: (event: Event,
10819
11254
  params: ContextMenuParams) => void): this;
10820
11255
  addListener(event: 'context-menu', listener: (event: Event,
@@ -10833,6 +11268,8 @@ declare namespace Electron {
10833
11268
  */
10834
11269
  on(event: 'crashed', listener: (event: Event,
10835
11270
  killed: boolean) => void): this;
11271
+ off(event: 'crashed', listener: (event: Event,
11272
+ killed: boolean) => void): this;
10836
11273
  once(event: 'crashed', listener: (event: Event,
10837
11274
  killed: boolean) => void): this;
10838
11275
  addListener(event: 'crashed', listener: (event: Event,
@@ -10871,6 +11308,21 @@ declare namespace Electron {
10871
11308
  * coordinates of the custom cursor's hotspot.
10872
11309
  */
10873
11310
  hotspot: Point) => void): this;
11311
+ off(event: 'cursor-changed', listener: (event: Event,
11312
+ type: string,
11313
+ image: NativeImage,
11314
+ /**
11315
+ * scaling factor for the custom cursor.
11316
+ */
11317
+ scale: number,
11318
+ /**
11319
+ * the size of the `image`.
11320
+ */
11321
+ size: Size,
11322
+ /**
11323
+ * coordinates of the custom cursor's hotspot.
11324
+ */
11325
+ hotspot: Point) => void): this;
10874
11326
  once(event: 'cursor-changed', listener: (event: Event,
10875
11327
  type: string,
10876
11328
  image: NativeImage,
@@ -10920,6 +11372,7 @@ declare namespace Electron {
10920
11372
  * Emitted when `webContents` is destroyed.
10921
11373
  */
10922
11374
  on(event: 'destroyed', listener: Function): this;
11375
+ off(event: 'destroyed', listener: Function): this;
10923
11376
  once(event: 'destroyed', listener: Function): this;
10924
11377
  addListener(event: 'destroyed', listener: Function): this;
10925
11378
  removeListener(event: 'destroyed', listener: Function): this;
@@ -10927,6 +11380,7 @@ declare namespace Electron {
10927
11380
  * Emitted when DevTools is closed.
10928
11381
  */
10929
11382
  on(event: 'devtools-closed', listener: Function): this;
11383
+ off(event: 'devtools-closed', listener: Function): this;
10930
11384
  once(event: 'devtools-closed', listener: Function): this;
10931
11385
  addListener(event: 'devtools-closed', listener: Function): this;
10932
11386
  removeListener(event: 'devtools-closed', listener: Function): this;
@@ -10934,6 +11388,7 @@ declare namespace Electron {
10934
11388
  * Emitted when DevTools is focused / opened.
10935
11389
  */
10936
11390
  on(event: 'devtools-focused', listener: Function): this;
11391
+ off(event: 'devtools-focused', listener: Function): this;
10937
11392
  once(event: 'devtools-focused', listener: Function): this;
10938
11393
  addListener(event: 'devtools-focused', listener: Function): this;
10939
11394
  removeListener(event: 'devtools-focused', listener: Function): this;
@@ -10946,6 +11401,11 @@ declare namespace Electron {
10946
11401
  * URL of the link that was clicked or selected.
10947
11402
  */
10948
11403
  url: string) => void): this;
11404
+ off(event: 'devtools-open-url', listener: (event: Event,
11405
+ /**
11406
+ * URL of the link that was clicked or selected.
11407
+ */
11408
+ url: string) => void): this;
10949
11409
  once(event: 'devtools-open-url', listener: (event: Event,
10950
11410
  /**
10951
11411
  * URL of the link that was clicked or selected.
@@ -10965,6 +11425,7 @@ declare namespace Electron {
10965
11425
  * Emitted when DevTools is opened.
10966
11426
  */
10967
11427
  on(event: 'devtools-opened', listener: Function): this;
11428
+ off(event: 'devtools-opened', listener: Function): this;
10968
11429
  once(event: 'devtools-opened', listener: Function): this;
10969
11430
  addListener(event: 'devtools-opened', listener: Function): this;
10970
11431
  removeListener(event: 'devtools-opened', listener: Function): this;
@@ -10972,6 +11433,7 @@ declare namespace Electron {
10972
11433
  * Emitted when the devtools window instructs the webContents to reload
10973
11434
  */
10974
11435
  on(event: 'devtools-reload-page', listener: Function): this;
11436
+ off(event: 'devtools-reload-page', listener: Function): this;
10975
11437
  once(event: 'devtools-reload-page', listener: Function): this;
10976
11438
  addListener(event: 'devtools-reload-page', listener: Function): this;
10977
11439
  removeListener(event: 'devtools-reload-page', listener: Function): this;
@@ -10983,6 +11445,11 @@ declare namespace Electron {
10983
11445
  * The guest web contents that is used by the `<webview>`.
10984
11446
  */
10985
11447
  webContents: WebContents) => void): this;
11448
+ off(event: 'did-attach-webview', listener: (event: Event,
11449
+ /**
11450
+ * The guest web contents that is used by the `<webview>`.
11451
+ */
11452
+ webContents: WebContents) => void): this;
10986
11453
  once(event: 'did-attach-webview', listener: (event: Event,
10987
11454
  /**
10988
11455
  * The guest web contents that is used by the `<webview>`.
@@ -11007,6 +11474,11 @@ declare namespace Electron {
11007
11474
  * Theme color is in format of '#rrggbb'. It is `null` when no theme color is set.
11008
11475
  */
11009
11476
  color: (string) | (null)) => void): this;
11477
+ off(event: 'did-change-theme-color', listener: (event: Event,
11478
+ /**
11479
+ * Theme color is in format of '#rrggbb'. It is `null` when no theme color is set.
11480
+ */
11481
+ color: (string) | (null)) => void): this;
11010
11482
  once(event: 'did-change-theme-color', listener: (event: Event,
11011
11483
  /**
11012
11484
  * Theme color is in format of '#rrggbb'. It is `null` when no theme color is set.
@@ -11032,6 +11504,8 @@ declare namespace Electron {
11032
11504
  */
11033
11505
  on(event: 'did-create-window', listener: (window: BrowserWindow,
11034
11506
  details: DidCreateWindowDetails) => void): this;
11507
+ off(event: 'did-create-window', listener: (window: BrowserWindow,
11508
+ details: DidCreateWindowDetails) => void): this;
11035
11509
  once(event: 'did-create-window', listener: (window: BrowserWindow,
11036
11510
  details: DidCreateWindowDetails) => void): this;
11037
11511
  addListener(event: 'did-create-window', listener: (window: BrowserWindow,
@@ -11049,6 +11523,13 @@ declare namespace Electron {
11049
11523
  isMainFrame: boolean,
11050
11524
  frameProcessId: number,
11051
11525
  frameRoutingId: number) => void): this;
11526
+ off(event: 'did-fail-load', listener: (event: Event,
11527
+ errorCode: number,
11528
+ errorDescription: string,
11529
+ validatedURL: string,
11530
+ isMainFrame: boolean,
11531
+ frameProcessId: number,
11532
+ frameRoutingId: number) => void): this;
11052
11533
  once(event: 'did-fail-load', listener: (event: Event,
11053
11534
  errorCode: number,
11054
11535
  errorDescription: string,
@@ -11081,6 +11562,13 @@ declare namespace Electron {
11081
11562
  isMainFrame: boolean,
11082
11563
  frameProcessId: number,
11083
11564
  frameRoutingId: number) => void): this;
11565
+ off(event: 'did-fail-provisional-load', listener: (event: Event,
11566
+ errorCode: number,
11567
+ errorDescription: string,
11568
+ validatedURL: string,
11569
+ isMainFrame: boolean,
11570
+ frameProcessId: number,
11571
+ frameRoutingId: number) => void): this;
11084
11572
  once(event: 'did-fail-provisional-load', listener: (event: Event,
11085
11573
  errorCode: number,
11086
11574
  errorDescription: string,
@@ -11107,6 +11595,7 @@ declare namespace Electron {
11107
11595
  * spinning, and the `onload` event was dispatched.
11108
11596
  */
11109
11597
  on(event: 'did-finish-load', listener: Function): this;
11598
+ off(event: 'did-finish-load', listener: Function): this;
11110
11599
  once(event: 'did-finish-load', listener: Function): this;
11111
11600
  addListener(event: 'did-finish-load', listener: Function): this;
11112
11601
  removeListener(event: 'did-finish-load', listener: Function): this;
@@ -11117,6 +11606,10 @@ declare namespace Electron {
11117
11606
  isMainFrame: boolean,
11118
11607
  frameProcessId: number,
11119
11608
  frameRoutingId: number) => void): this;
11609
+ off(event: 'did-frame-finish-load', listener: (event: Event,
11610
+ isMainFrame: boolean,
11611
+ frameProcessId: number,
11612
+ frameRoutingId: number) => void): this;
11120
11613
  once(event: 'did-frame-finish-load', listener: (event: Event,
11121
11614
  isMainFrame: boolean,
11122
11615
  frameProcessId: number,
@@ -11149,6 +11642,19 @@ declare namespace Electron {
11149
11642
  isMainFrame: boolean,
11150
11643
  frameProcessId: number,
11151
11644
  frameRoutingId: number) => void): this;
11645
+ off(event: 'did-frame-navigate', listener: (event: Event,
11646
+ url: string,
11647
+ /**
11648
+ * -1 for non HTTP navigations
11649
+ */
11650
+ httpResponseCode: number,
11651
+ /**
11652
+ * empty for non HTTP navigations,
11653
+ */
11654
+ httpStatusText: string,
11655
+ isMainFrame: boolean,
11656
+ frameProcessId: number,
11657
+ frameRoutingId: number) => void): this;
11152
11658
  once(event: 'did-frame-navigate', listener: (event: Event,
11153
11659
  url: string,
11154
11660
  /**
@@ -11205,6 +11711,16 @@ declare namespace Electron {
11205
11711
  * empty for non HTTP navigations
11206
11712
  */
11207
11713
  httpStatusText: string) => void): this;
11714
+ off(event: 'did-navigate', listener: (event: Event,
11715
+ url: string,
11716
+ /**
11717
+ * -1 for non HTTP navigations
11718
+ */
11719
+ httpResponseCode: number,
11720
+ /**
11721
+ * empty for non HTTP navigations
11722
+ */
11723
+ httpStatusText: string) => void): this;
11208
11724
  once(event: 'did-navigate', listener: (event: Event,
11209
11725
  url: string,
11210
11726
  /**
@@ -11247,6 +11763,11 @@ declare namespace Electron {
11247
11763
  isMainFrame: boolean,
11248
11764
  frameProcessId: number,
11249
11765
  frameRoutingId: number) => void): this;
11766
+ off(event: 'did-navigate-in-page', listener: (event: Event,
11767
+ url: string,
11768
+ isMainFrame: boolean,
11769
+ frameProcessId: number,
11770
+ frameRoutingId: number) => void): this;
11250
11771
  once(event: 'did-navigate-in-page', listener: (event: Event,
11251
11772
  url: string,
11252
11773
  isMainFrame: boolean,
@@ -11290,6 +11811,27 @@ declare namespace Electron {
11290
11811
  * @deprecated
11291
11812
  */
11292
11813
  frameRoutingId: number) => void): this;
11814
+ off(event: 'did-redirect-navigation', listener: (details: Event<WebContentsDidRedirectNavigationEventParams>,
11815
+ /**
11816
+ * @deprecated
11817
+ */
11818
+ url: string,
11819
+ /**
11820
+ * @deprecated
11821
+ */
11822
+ isInPlace: boolean,
11823
+ /**
11824
+ * @deprecated
11825
+ */
11826
+ isMainFrame: boolean,
11827
+ /**
11828
+ * @deprecated
11829
+ */
11830
+ frameProcessId: number,
11831
+ /**
11832
+ * @deprecated
11833
+ */
11834
+ frameRoutingId: number) => void): this;
11293
11835
  once(event: 'did-redirect-navigation', listener: (details: Event<WebContentsDidRedirectNavigationEventParams>,
11294
11836
  /**
11295
11837
  * @deprecated
@@ -11357,6 +11899,7 @@ declare namespace Electron {
11357
11899
  * Corresponds to the points in time when the spinner of the tab started spinning.
11358
11900
  */
11359
11901
  on(event: 'did-start-loading', listener: Function): this;
11902
+ off(event: 'did-start-loading', listener: Function): this;
11360
11903
  once(event: 'did-start-loading', listener: Function): this;
11361
11904
  addListener(event: 'did-start-loading', listener: Function): this;
11362
11905
  removeListener(event: 'did-start-loading', listener: Function): this;
@@ -11384,6 +11927,27 @@ declare namespace Electron {
11384
11927
  * @deprecated
11385
11928
  */
11386
11929
  frameRoutingId: number) => void): this;
11930
+ off(event: 'did-start-navigation', listener: (details: Event<WebContentsDidStartNavigationEventParams>,
11931
+ /**
11932
+ * @deprecated
11933
+ */
11934
+ url: string,
11935
+ /**
11936
+ * @deprecated
11937
+ */
11938
+ isInPlace: boolean,
11939
+ /**
11940
+ * @deprecated
11941
+ */
11942
+ isMainFrame: boolean,
11943
+ /**
11944
+ * @deprecated
11945
+ */
11946
+ frameProcessId: number,
11947
+ /**
11948
+ * @deprecated
11949
+ */
11950
+ frameRoutingId: number) => void): this;
11387
11951
  once(event: 'did-start-navigation', listener: (details: Event<WebContentsDidStartNavigationEventParams>,
11388
11952
  /**
11389
11953
  * @deprecated
@@ -11451,6 +12015,7 @@ declare namespace Electron {
11451
12015
  * Corresponds to the points in time when the spinner of the tab stopped spinning.
11452
12016
  */
11453
12017
  on(event: 'did-stop-loading', listener: Function): this;
12018
+ off(event: 'did-stop-loading', listener: Function): this;
11454
12019
  once(event: 'did-stop-loading', listener: Function): this;
11455
12020
  addListener(event: 'did-stop-loading', listener: Function): this;
11456
12021
  removeListener(event: 'did-stop-loading', listener: Function): this;
@@ -11458,6 +12023,7 @@ declare namespace Electron {
11458
12023
  * Emitted when the document in the top-level frame is loaded.
11459
12024
  */
11460
12025
  on(event: 'dom-ready', listener: Function): this;
12026
+ off(event: 'dom-ready', listener: Function): this;
11461
12027
  once(event: 'dom-ready', listener: Function): this;
11462
12028
  addListener(event: 'dom-ready', listener: Function): this;
11463
12029
  removeListener(event: 'dom-ready', listener: Function): this;
@@ -11465,6 +12031,7 @@ declare namespace Electron {
11465
12031
  * Emitted when the window enters a full-screen state triggered by HTML API.
11466
12032
  */
11467
12033
  on(event: 'enter-html-full-screen', listener: Function): this;
12034
+ off(event: 'enter-html-full-screen', listener: Function): this;
11468
12035
  once(event: 'enter-html-full-screen', listener: Function): this;
11469
12036
  addListener(event: 'enter-html-full-screen', listener: Function): this;
11470
12037
  removeListener(event: 'enter-html-full-screen', listener: Function): this;
@@ -11481,6 +12048,7 @@ declare namespace Electron {
11481
12048
  * window.
11482
12049
  */
11483
12050
  on(event: 'focus', listener: Function): this;
12051
+ off(event: 'focus', listener: Function): this;
11484
12052
  once(event: 'focus', listener: Function): this;
11485
12053
  addListener(event: 'focus', listener: Function): this;
11486
12054
  removeListener(event: 'focus', listener: Function): this;
@@ -11489,6 +12057,8 @@ declare namespace Electron {
11489
12057
  */
11490
12058
  on(event: 'found-in-page', listener: (event: Event,
11491
12059
  result: Result) => void): this;
12060
+ off(event: 'found-in-page', listener: (event: Event,
12061
+ result: Result) => void): this;
11492
12062
  once(event: 'found-in-page', listener: (event: Event,
11493
12063
  result: Result) => void): this;
11494
12064
  addListener(event: 'found-in-page', listener: (event: Event,
@@ -11501,6 +12071,8 @@ declare namespace Electron {
11501
12071
  */
11502
12072
  on(event: 'frame-created', listener: (event: Event,
11503
12073
  details: FrameCreatedDetails) => void): this;
12074
+ off(event: 'frame-created', listener: (event: Event,
12075
+ details: FrameCreatedDetails) => void): this;
11504
12076
  once(event: 'frame-created', listener: (event: Event,
11505
12077
  details: FrameCreatedDetails) => void): this;
11506
12078
  addListener(event: 'frame-created', listener: (event: Event,
@@ -11513,6 +12085,8 @@ declare namespace Electron {
11513
12085
  */
11514
12086
  on(event: 'input-event', listener: (event: Event,
11515
12087
  inputEvent: InputEvent) => void): this;
12088
+ off(event: 'input-event', listener: (event: Event,
12089
+ inputEvent: InputEvent) => void): this;
11516
12090
  once(event: 'input-event', listener: (event: Event,
11517
12091
  inputEvent: InputEvent) => void): this;
11518
12092
  addListener(event: 'input-event', listener: (event: Event,
@@ -11529,6 +12103,9 @@ declare namespace Electron {
11529
12103
  on(event: 'ipc-message', listener: (event: IpcMainEvent,
11530
12104
  channel: string,
11531
12105
  ...args: any[]) => void): this;
12106
+ off(event: 'ipc-message', listener: (event: IpcMainEvent,
12107
+ channel: string,
12108
+ ...args: any[]) => void): this;
11532
12109
  once(event: 'ipc-message', listener: (event: IpcMainEvent,
11533
12110
  channel: string,
11534
12111
  ...args: any[]) => void): this;
@@ -11548,6 +12125,9 @@ declare namespace Electron {
11548
12125
  on(event: 'ipc-message-sync', listener: (event: IpcMainEvent,
11549
12126
  channel: string,
11550
12127
  ...args: any[]) => void): this;
12128
+ off(event: 'ipc-message-sync', listener: (event: IpcMainEvent,
12129
+ channel: string,
12130
+ ...args: any[]) => void): this;
11551
12131
  once(event: 'ipc-message-sync', listener: (event: IpcMainEvent,
11552
12132
  channel: string,
11553
12133
  ...args: any[]) => void): this;
@@ -11561,6 +12141,7 @@ declare namespace Electron {
11561
12141
  * Emitted when the window leaves a full-screen state triggered by HTML API.
11562
12142
  */
11563
12143
  on(event: 'leave-html-full-screen', listener: Function): this;
12144
+ off(event: 'leave-html-full-screen', listener: Function): this;
11564
12145
  once(event: 'leave-html-full-screen', listener: Function): this;
11565
12146
  addListener(event: 'leave-html-full-screen', listener: Function): this;
11566
12147
  removeListener(event: 'leave-html-full-screen', listener: Function): this;
@@ -11573,6 +12154,10 @@ declare namespace Electron {
11573
12154
  authenticationResponseDetails: AuthenticationResponseDetails,
11574
12155
  authInfo: AuthInfo,
11575
12156
  callback: (username?: string, password?: string) => void) => void): this;
12157
+ off(event: 'login', listener: (event: Event,
12158
+ authenticationResponseDetails: AuthenticationResponseDetails,
12159
+ authInfo: AuthInfo,
12160
+ callback: (username?: string, password?: string) => void) => void): this;
11576
12161
  once(event: 'login', listener: (event: Event,
11577
12162
  authenticationResponseDetails: AuthenticationResponseDetails,
11578
12163
  authInfo: AuthInfo,
@@ -11589,6 +12174,7 @@ declare namespace Electron {
11589
12174
  * Emitted when media is paused or done playing.
11590
12175
  */
11591
12176
  on(event: 'media-paused', listener: Function): this;
12177
+ off(event: 'media-paused', listener: Function): this;
11592
12178
  once(event: 'media-paused', listener: Function): this;
11593
12179
  addListener(event: 'media-paused', listener: Function): this;
11594
12180
  removeListener(event: 'media-paused', listener: Function): this;
@@ -11596,6 +12182,7 @@ declare namespace Electron {
11596
12182
  * Emitted when media starts playing.
11597
12183
  */
11598
12184
  on(event: 'media-started-playing', listener: Function): this;
12185
+ off(event: 'media-started-playing', listener: Function): this;
11599
12186
  once(event: 'media-started-playing', listener: Function): this;
11600
12187
  addListener(event: 'media-started-playing', listener: Function): this;
11601
12188
  removeListener(event: 'media-started-playing', listener: Function): this;
@@ -11607,6 +12194,11 @@ declare namespace Electron {
11607
12194
  * Array of URLs.
11608
12195
  */
11609
12196
  favicons: string[]) => void): this;
12197
+ off(event: 'page-favicon-updated', listener: (event: Event,
12198
+ /**
12199
+ * Array of URLs.
12200
+ */
12201
+ favicons: string[]) => void): this;
11610
12202
  once(event: 'page-favicon-updated', listener: (event: Event,
11611
12203
  /**
11612
12204
  * Array of URLs.
@@ -11629,6 +12221,9 @@ declare namespace Electron {
11629
12221
  on(event: 'page-title-updated', listener: (event: Event,
11630
12222
  title: string,
11631
12223
  explicitSet: boolean) => void): this;
12224
+ off(event: 'page-title-updated', listener: (event: Event,
12225
+ title: string,
12226
+ explicitSet: boolean) => void): this;
11632
12227
  once(event: 'page-title-updated', listener: (event: Event,
11633
12228
  title: string,
11634
12229
  explicitSet: boolean) => void): this;
@@ -11648,6 +12243,12 @@ declare namespace Electron {
11648
12243
  * The image data of the whole frame.
11649
12244
  */
11650
12245
  image: NativeImage) => void): this;
12246
+ off(event: 'paint', listener: (event: Event,
12247
+ dirtyRect: Rectangle,
12248
+ /**
12249
+ * The image data of the whole frame.
12250
+ */
12251
+ image: NativeImage) => void): this;
11651
12252
  once(event: 'paint', listener: (event: Event,
11652
12253
  dirtyRect: Rectangle,
11653
12254
  /**
@@ -11672,6 +12273,9 @@ declare namespace Electron {
11672
12273
  on(event: 'plugin-crashed', listener: (event: Event,
11673
12274
  name: string,
11674
12275
  version: string) => void): this;
12276
+ off(event: 'plugin-crashed', listener: (event: Event,
12277
+ name: string,
12278
+ version: string) => void): this;
11675
12279
  once(event: 'plugin-crashed', listener: (event: Event,
11676
12280
  name: string,
11677
12281
  version: string) => void): this;
@@ -11693,6 +12297,12 @@ declare namespace Electron {
11693
12297
  * scrolling.
11694
12298
  */
11695
12299
  preferredSize: Size) => void): this;
12300
+ off(event: 'preferred-size-changed', listener: (event: Event,
12301
+ /**
12302
+ * The minimum size needed to contain the layout of the document—without requiring
12303
+ * scrolling.
12304
+ */
12305
+ preferredSize: Size) => void): this;
11696
12306
  once(event: 'preferred-size-changed', listener: (event: Event,
11697
12307
  /**
11698
12308
  * The minimum size needed to contain the layout of the document—without requiring
@@ -11718,6 +12328,9 @@ declare namespace Electron {
11718
12328
  on(event: 'preload-error', listener: (event: Event,
11719
12329
  preloadPath: string,
11720
12330
  error: Error) => void): this;
12331
+ off(event: 'preload-error', listener: (event: Event,
12332
+ preloadPath: string,
12333
+ error: Error) => void): this;
11721
12334
  once(event: 'preload-error', listener: (event: Event,
11722
12335
  preloadPath: string,
11723
12336
  error: Error) => void): this;
@@ -11733,6 +12346,8 @@ declare namespace Electron {
11733
12346
  */
11734
12347
  on(event: 'render-process-gone', listener: (event: Event,
11735
12348
  details: RenderProcessGoneDetails) => void): this;
12349
+ off(event: 'render-process-gone', listener: (event: Event,
12350
+ details: RenderProcessGoneDetails) => void): this;
11736
12351
  once(event: 'render-process-gone', listener: (event: Event,
11737
12352
  details: RenderProcessGoneDetails) => void): this;
11738
12353
  addListener(event: 'render-process-gone', listener: (event: Event,
@@ -11743,6 +12358,7 @@ declare namespace Electron {
11743
12358
  * Emitted when the unresponsive web page becomes responsive again.
11744
12359
  */
11745
12360
  on(event: 'responsive', listener: Function): this;
12361
+ off(event: 'responsive', listener: Function): this;
11746
12362
  once(event: 'responsive', listener: Function): this;
11747
12363
  addListener(event: 'responsive', listener: Function): this;
11748
12364
  removeListener(event: 'responsive', listener: Function): this;
@@ -11764,6 +12380,9 @@ declare namespace Electron {
11764
12380
  on(event: 'select-bluetooth-device', listener: (event: Event,
11765
12381
  devices: BluetoothDevice[],
11766
12382
  callback: (deviceId: string) => void) => void): this;
12383
+ off(event: 'select-bluetooth-device', listener: (event: Event,
12384
+ devices: BluetoothDevice[],
12385
+ callback: (deviceId: string) => void) => void): this;
11767
12386
  once(event: 'select-bluetooth-device', listener: (event: Event,
11768
12387
  devices: BluetoothDevice[],
11769
12388
  callback: (deviceId: string) => void) => void): this;
@@ -11782,6 +12401,10 @@ declare namespace Electron {
11782
12401
  url: string,
11783
12402
  certificateList: Certificate[],
11784
12403
  callback: (certificate: Certificate) => void) => void): this;
12404
+ off(event: 'select-client-certificate', listener: (event: Event,
12405
+ url: string,
12406
+ certificateList: Certificate[],
12407
+ callback: (certificate: Certificate) => void) => void): this;
11785
12408
  once(event: 'select-client-certificate', listener: (event: Event,
11786
12409
  url: string,
11787
12410
  certificateList: Certificate[],
@@ -11798,6 +12421,7 @@ declare namespace Electron {
11798
12421
  * Emitted when the web page becomes unresponsive.
11799
12422
  */
11800
12423
  on(event: 'unresponsive', listener: Function): this;
12424
+ off(event: 'unresponsive', listener: Function): this;
11801
12425
  once(event: 'unresponsive', listener: Function): this;
11802
12426
  addListener(event: 'unresponsive', listener: Function): this;
11803
12427
  removeListener(event: 'unresponsive', listener: Function): this;
@@ -11806,6 +12430,8 @@ declare namespace Electron {
11806
12430
  */
11807
12431
  on(event: 'update-target-url', listener: (event: Event,
11808
12432
  url: string) => void): this;
12433
+ off(event: 'update-target-url', listener: (event: Event,
12434
+ url: string) => void): this;
11809
12435
  once(event: 'update-target-url', listener: (event: Event,
11810
12436
  url: string) => void): this;
11811
12437
  addListener(event: 'update-target-url', listener: (event: Event,
@@ -11831,6 +12457,17 @@ declare namespace Electron {
11831
12457
  * modified to adjust the parameters of the guest page.
11832
12458
  */
11833
12459
  params: Record<string, string>) => void): this;
12460
+ off(event: 'will-attach-webview', listener: (event: Event,
12461
+ /**
12462
+ * The web preferences that will be used by the guest page. This object can be
12463
+ * modified to adjust the preferences for the guest page.
12464
+ */
12465
+ webPreferences: WebPreferences,
12466
+ /**
12467
+ * The other `<webview>` parameters such as the `src` URL. This object can be
12468
+ * modified to adjust the parameters of the guest page.
12469
+ */
12470
+ params: Record<string, string>) => void): this;
11834
12471
  once(event: 'will-attach-webview', listener: (event: Event,
11835
12472
  /**
11836
12473
  * The web preferences that will be used by the guest page. This object can be
@@ -11883,6 +12520,7 @@ declare namespace Electron {
11883
12520
  * Calling `event.preventDefault()` will prevent the navigation.
11884
12521
  */
11885
12522
  on(event: 'will-frame-navigate', listener: (details: Event<WebContentsWillFrameNavigateEventParams>) => void): this;
12523
+ off(event: 'will-frame-navigate', listener: (details: Event<WebContentsWillFrameNavigateEventParams>) => void): this;
11886
12524
  once(event: 'will-frame-navigate', listener: (details: Event<WebContentsWillFrameNavigateEventParams>) => void): this;
11887
12525
  addListener(event: 'will-frame-navigate', listener: (details: Event<WebContentsWillFrameNavigateEventParams>) => void): this;
11888
12526
  removeListener(event: 'will-frame-navigate', listener: (details: Event<WebContentsWillFrameNavigateEventParams>) => void): this;
@@ -11921,6 +12559,27 @@ declare namespace Electron {
11921
12559
  * @deprecated
11922
12560
  */
11923
12561
  frameRoutingId: number) => void): this;
12562
+ off(event: 'will-navigate', listener: (details: Event<WebContentsWillNavigateEventParams>,
12563
+ /**
12564
+ * @deprecated
12565
+ */
12566
+ url: string,
12567
+ /**
12568
+ * @deprecated
12569
+ */
12570
+ isInPlace: boolean,
12571
+ /**
12572
+ * @deprecated
12573
+ */
12574
+ isMainFrame: boolean,
12575
+ /**
12576
+ * @deprecated
12577
+ */
12578
+ frameProcessId: number,
12579
+ /**
12580
+ * @deprecated
12581
+ */
12582
+ frameRoutingId: number) => void): this;
11924
12583
  once(event: 'will-navigate', listener: (details: Event<WebContentsWillNavigateEventParams>,
11925
12584
  /**
11926
12585
  * @deprecated
@@ -11996,6 +12655,7 @@ declare namespace Electron {
11996
12655
  * owning BrowserWindow should one exist per the specification.
11997
12656
  */
11998
12657
  on(event: 'will-prevent-unload', listener: (event: Event) => void): this;
12658
+ off(event: 'will-prevent-unload', listener: (event: Event) => void): this;
11999
12659
  once(event: 'will-prevent-unload', listener: (event: Event) => void): this;
12000
12660
  addListener(event: 'will-prevent-unload', listener: (event: Event) => void): this;
12001
12661
  removeListener(event: 'will-prevent-unload', listener: (event: Event) => void): this;
@@ -12030,6 +12690,27 @@ declare namespace Electron {
12030
12690
  * @deprecated
12031
12691
  */
12032
12692
  frameRoutingId: number) => void): this;
12693
+ off(event: 'will-redirect', listener: (details: Event<WebContentsWillRedirectEventParams>,
12694
+ /**
12695
+ * @deprecated
12696
+ */
12697
+ url: string,
12698
+ /**
12699
+ * @deprecated
12700
+ */
12701
+ isInPlace: boolean,
12702
+ /**
12703
+ * @deprecated
12704
+ */
12705
+ isMainFrame: boolean,
12706
+ /**
12707
+ * @deprecated
12708
+ */
12709
+ frameProcessId: number,
12710
+ /**
12711
+ * @deprecated
12712
+ */
12713
+ frameRoutingId: number) => void): this;
12033
12714
  once(event: 'will-redirect', listener: (details: Event<WebContentsWillRedirectEventParams>,
12034
12715
  /**
12035
12716
  * @deprecated
@@ -12102,6 +12783,11 @@ declare namespace Electron {
12102
12783
  * Can be `in` or `out`.
12103
12784
  */
12104
12785
  zoomDirection: ('in' | 'out')) => void): this;
12786
+ off(event: 'zoom-changed', listener: (event: Event,
12787
+ /**
12788
+ * Can be `in` or `out`.
12789
+ */
12790
+ zoomDirection: ('in' | 'out')) => void): this;
12105
12791
  once(event: 'zoom-changed', listener: (event: Event,
12106
12792
  /**
12107
12793
  * Can be `in` or `out`.
@@ -12346,6 +13032,14 @@ declare namespace Electron {
12346
13032
  * Returns the WebRTC IP Handling Policy.
12347
13033
  */
12348
13034
  getWebRTCIPHandlingPolicy(): string;
13035
+ /**
13036
+ * * `min` Integer - The minimum UDP port number that WebRTC should use.
13037
+ * * `max` Integer - The maximum UDP port number that WebRTC should use.
13038
+ *
13039
+ * By default this value is `{ min: 0, max: 0 }` , which would apply no restriction
13040
+ * on the udp port range.
13041
+ */
13042
+ getWebRTCUDPPortRange(): WebRTCUDPPortRange;
12349
13043
  /**
12350
13044
  * the current zoom factor.
12351
13045
  */
@@ -12694,6 +13388,12 @@ declare namespace Electron {
12694
13388
  * exposed via WebRTC. See BrowserLeaks for more details.
12695
13389
  */
12696
13390
  setWebRTCIPHandlingPolicy(policy: 'default' | 'default_public_interface_only' | 'default_public_and_private_interfaces' | 'disable_non_proxied_udp'): void;
13391
+ /**
13392
+ * Setting the WebRTC UDP Port Range allows you to restrict the udp port range used
13393
+ * by WebRTC. By default the port range is unrestricted. **Note:** To reset to an
13394
+ * unrestricted port range this value should be set to `{ min: 0, max: 0 }`.
13395
+ */
13396
+ setWebRTCUDPPortRange(udpPortRange: UdpPortRange): void;
12697
13397
  /**
12698
13398
  * Called before creating a window a new window is requested by the renderer, e.g.
12699
13399
  * by `window.open()`, a link with `target="_blank"`, shift+clicking on a link, or
@@ -13082,6 +13782,7 @@ declare namespace Electron {
13082
13782
  * Emitted when the document is loaded.
13083
13783
  */
13084
13784
  on(event: 'dom-ready', listener: Function): this;
13785
+ off(event: 'dom-ready', listener: Function): this;
13085
13786
  once(event: 'dom-ready', listener: Function): this;
13086
13787
  addListener(event: 'dom-ready', listener: Function): this;
13087
13788
  removeListener(event: 'dom-ready', listener: Function): this;
@@ -13256,7 +13957,10 @@ declare namespace Electron {
13256
13957
  autoplayPolicy?: ('no-user-gesture-required' | 'user-gesture-required' | 'document-user-activation-required');
13257
13958
  /**
13258
13959
  * Whether to throttle animations and timers when the page becomes background. This
13259
- * also affects the Page Visibility API. Defaults to `true`.
13960
+ * also affects the Page Visibility API. When at least one webContents displayed in
13961
+ * a single browserWindow has disabled `backgroundThrottling` then frames will be
13962
+ * drawn and swapped for the whole window and other webContents displayed by it.
13963
+ * Defaults to `true`.
13260
13964
  */
13261
13965
  backgroundThrottling?: boolean;
13262
13966
  /**
@@ -16565,6 +17269,14 @@ declare namespace Electron {
16565
17269
  * which case the content will be scaled to fit the paper size.
16566
17270
  */
16567
17271
  preferCSSPageSize?: boolean;
17272
+ /**
17273
+ * Whether or not to generate a tagged (accessible) PDF. Defaults to false. As this
17274
+ * property is experimental, the generated PDF may not adhere fully to PDF/UA and
17275
+ * WCAG standards.
17276
+ *
17277
+ * @experimental
17278
+ */
17279
+ generateTaggedPDF?: boolean;
16568
17280
  }
16569
17281
 
16570
17282
  interface Privileges {
@@ -17062,7 +17774,7 @@ declare namespace Electron {
17062
17774
  /**
17063
17775
  * The height of the title bar and Window Controls Overlay in pixels.
17064
17776
  *
17065
- * @platform win32
17777
+ * @platform darwin,win32
17066
17778
  */
17067
17779
  height?: number;
17068
17780
  }
@@ -17287,6 +17999,17 @@ declare namespace Electron {
17287
17999
  percentage: number;
17288
18000
  }
17289
18001
 
18002
+ interface UdpPortRange {
18003
+ /**
18004
+ * The minimum UDP port number that WebRTC should use.
18005
+ */
18006
+ min: number;
18007
+ /**
18008
+ * The maximum UDP port number that WebRTC should use.
18009
+ */
18010
+ max: number;
18011
+ }
18012
+
17290
18013
  interface UpdateTargetUrlEvent extends DOMEvent {
17291
18014
  url: string;
17292
18015
  }
@@ -17559,6 +18282,17 @@ declare namespace Electron {
17559
18282
  initiator?: WebFrameMain;
17560
18283
  }
17561
18284
 
18285
+ interface WebRTCUDPPortRange {
18286
+ /**
18287
+ * The minimum UDP port number that WebRTC should use.
18288
+ */
18289
+ min: number;
18290
+ /**
18291
+ * The maximum UDP port number that WebRTC should use.
18292
+ */
18293
+ max: number;
18294
+ }
18295
+
17562
18296
  interface WebviewTagPrintOptions {
17563
18297
  /**
17564
18298
  * Don't ask user for print settings. Default is `false`.
@@ -18153,6 +18887,7 @@ declare namespace Electron {
18153
18887
  type TouchBarSliderConstructorOptions = Electron.TouchBarSliderConstructorOptions;
18154
18888
  type TouchBarSpacerConstructorOptions = Electron.TouchBarSpacerConstructorOptions;
18155
18889
  type TraceBufferUsageReturnValue = Electron.TraceBufferUsageReturnValue;
18890
+ type UdpPortRange = Electron.UdpPortRange;
18156
18891
  type UpdateTargetUrlEvent = Electron.UpdateTargetUrlEvent;
18157
18892
  type UploadProgress = Electron.UploadProgress;
18158
18893
  type UsbDeviceRevokedDetails = Electron.UsbDeviceRevokedDetails;
@@ -18165,6 +18900,7 @@ declare namespace Electron {
18165
18900
  type WebContentsWillFrameNavigateEventParams = Electron.WebContentsWillFrameNavigateEventParams;
18166
18901
  type WebContentsWillNavigateEventParams = Electron.WebContentsWillNavigateEventParams;
18167
18902
  type WebContentsWillRedirectEventParams = Electron.WebContentsWillRedirectEventParams;
18903
+ type WebRTCUDPPortRange = Electron.WebRTCUDPPortRange;
18168
18904
  type WebviewTagPrintOptions = Electron.WebviewTagPrintOptions;
18169
18905
  type WillFrameNavigateEvent = Electron.WillFrameNavigateEvent;
18170
18906
  type WillNavigateEvent = Electron.WillNavigateEvent;
@@ -18480,6 +19216,7 @@ declare namespace Electron {
18480
19216
  type TouchBarSliderConstructorOptions = Electron.TouchBarSliderConstructorOptions;
18481
19217
  type TouchBarSpacerConstructorOptions = Electron.TouchBarSpacerConstructorOptions;
18482
19218
  type TraceBufferUsageReturnValue = Electron.TraceBufferUsageReturnValue;
19219
+ type UdpPortRange = Electron.UdpPortRange;
18483
19220
  type UpdateTargetUrlEvent = Electron.UpdateTargetUrlEvent;
18484
19221
  type UploadProgress = Electron.UploadProgress;
18485
19222
  type UsbDeviceRevokedDetails = Electron.UsbDeviceRevokedDetails;
@@ -18492,6 +19229,7 @@ declare namespace Electron {
18492
19229
  type WebContentsWillFrameNavigateEventParams = Electron.WebContentsWillFrameNavigateEventParams;
18493
19230
  type WebContentsWillNavigateEventParams = Electron.WebContentsWillNavigateEventParams;
18494
19231
  type WebContentsWillRedirectEventParams = Electron.WebContentsWillRedirectEventParams;
19232
+ type WebRTCUDPPortRange = Electron.WebRTCUDPPortRange;
18495
19233
  type WebviewTagPrintOptions = Electron.WebviewTagPrintOptions;
18496
19234
  type WillFrameNavigateEvent = Electron.WillFrameNavigateEvent;
18497
19235
  type WillNavigateEvent = Electron.WillNavigateEvent;
@@ -18741,6 +19479,7 @@ declare namespace Electron {
18741
19479
  type TouchBarSliderConstructorOptions = Electron.TouchBarSliderConstructorOptions;
18742
19480
  type TouchBarSpacerConstructorOptions = Electron.TouchBarSpacerConstructorOptions;
18743
19481
  type TraceBufferUsageReturnValue = Electron.TraceBufferUsageReturnValue;
19482
+ type UdpPortRange = Electron.UdpPortRange;
18744
19483
  type UpdateTargetUrlEvent = Electron.UpdateTargetUrlEvent;
18745
19484
  type UploadProgress = Electron.UploadProgress;
18746
19485
  type UsbDeviceRevokedDetails = Electron.UsbDeviceRevokedDetails;
@@ -18753,6 +19492,7 @@ declare namespace Electron {
18753
19492
  type WebContentsWillFrameNavigateEventParams = Electron.WebContentsWillFrameNavigateEventParams;
18754
19493
  type WebContentsWillNavigateEventParams = Electron.WebContentsWillNavigateEventParams;
18755
19494
  type WebContentsWillRedirectEventParams = Electron.WebContentsWillRedirectEventParams;
19495
+ type WebRTCUDPPortRange = Electron.WebRTCUDPPortRange;
18756
19496
  type WebviewTagPrintOptions = Electron.WebviewTagPrintOptions;
18757
19497
  type WillFrameNavigateEvent = Electron.WillFrameNavigateEvent;
18758
19498
  type WillNavigateEvent = Electron.WillNavigateEvent;
@@ -19083,6 +19823,7 @@ declare namespace Electron {
19083
19823
  type TouchBarSliderConstructorOptions = Electron.TouchBarSliderConstructorOptions;
19084
19824
  type TouchBarSpacerConstructorOptions = Electron.TouchBarSpacerConstructorOptions;
19085
19825
  type TraceBufferUsageReturnValue = Electron.TraceBufferUsageReturnValue;
19826
+ type UdpPortRange = Electron.UdpPortRange;
19086
19827
  type UpdateTargetUrlEvent = Electron.UpdateTargetUrlEvent;
19087
19828
  type UploadProgress = Electron.UploadProgress;
19088
19829
  type UsbDeviceRevokedDetails = Electron.UsbDeviceRevokedDetails;
@@ -19095,6 +19836,7 @@ declare namespace Electron {
19095
19836
  type WebContentsWillFrameNavigateEventParams = Electron.WebContentsWillFrameNavigateEventParams;
19096
19837
  type WebContentsWillNavigateEventParams = Electron.WebContentsWillNavigateEventParams;
19097
19838
  type WebContentsWillRedirectEventParams = Electron.WebContentsWillRedirectEventParams;
19839
+ type WebRTCUDPPortRange = Electron.WebRTCUDPPortRange;
19098
19840
  type WebviewTagPrintOptions = Electron.WebviewTagPrintOptions;
19099
19841
  type WillFrameNavigateEvent = Electron.WillFrameNavigateEvent;
19100
19842
  type WillNavigateEvent = Electron.WillNavigateEvent;
@@ -19275,6 +20017,7 @@ declare namespace NodeJS {
19275
20017
  * beginning to load the web page or the main script.
19276
20018
  */
19277
20019
  on(event: 'loaded', listener: Function): this;
20020
+ off(event: 'loaded', listener: Function): this;
19278
20021
  once(event: 'loaded', listener: Function): this;
19279
20022
  addListener(event: 'loaded', listener: Function): this;
19280
20023
  removeListener(event: 'loaded', listener: Function): this;