|
1 | | -// Type definitions for Electron 4.2.3 |
| 1 | +// Type definitions for Electron 4.2.4 |
2 | 2 | // Project: http://electronjs.org/ |
3 | 3 | // Definitions by: The Electron Team <https://github.com/electron/electron> |
4 | 4 | // Definitions: https://github.com/electron/electron-typescript-definitions |
@@ -1338,16 +1338,21 @@ declare namespace Electron { |
1338 | 1338 | removeListener(event: 'new-window-for-tab', listener: Function): this; |
1339 | 1339 | /** |
1340 | 1340 | * Emitted when the document changed its title, calling event.preventDefault() will |
1341 | | - * prevent the native window's title from changing. |
| 1341 | + * prevent the native window's title from changing. explicitSet is false when title |
| 1342 | + * is synthesized from file url. |
1342 | 1343 | */ |
1343 | 1344 | on(event: 'page-title-updated', listener: (event: Event, |
1344 | | - title: string, explicitSet: boolean) => void): this; |
| 1345 | + title: string, |
| 1346 | + explicitSet: boolean) => void): this; |
1345 | 1347 | once(event: 'page-title-updated', listener: (event: Event, |
1346 | | - title: string, explicitSet: boolean) => void): this; |
| 1348 | + title: string, |
| 1349 | + explicitSet: boolean) => void): this; |
1347 | 1350 | addListener(event: 'page-title-updated', listener: (event: Event, |
1348 | | - title: string, explicitSet: boolean) => void): this; |
| 1351 | + title: string, |
| 1352 | + explicitSet: boolean) => void): this; |
1349 | 1353 | removeListener(event: 'page-title-updated', listener: (event: Event, |
1350 | | - title: string, explicitSet: boolean) => void): this; |
| 1354 | + title: string, |
| 1355 | + explicitSet: boolean) => void): this; |
1351 | 1356 | /** |
1352 | 1357 | * Emitted when the web page has been rendered (while not being shown) and window |
1353 | 1358 | * can be displayed without a visual flash. |
@@ -3355,35 +3360,6 @@ declare namespace Electron { |
3355 | 3360 | type?: ('task' | 'separator' | 'file'); |
3356 | 3361 | } |
3357 | 3362 |
|
3358 | | - interface MemoryInfo { |
3359 | | - |
3360 | | - // Docs: http://electronjs.org/docs/api/structures/memory-info |
3361 | | - |
3362 | | - /** |
3363 | | - * The maximum amount of memory that has ever been pinned to actual physical RAM. |
3364 | | - * On macOS its value will always be 0. |
3365 | | - */ |
3366 | | - peakWorkingSetSize: number; |
3367 | | - /** |
3368 | | - * Process id of the process. |
3369 | | - */ |
3370 | | - pid: number; |
3371 | | - /** |
3372 | | - * The amount of memory not shared by other processes, such as JS heap or HTML |
3373 | | - * content. |
3374 | | - */ |
3375 | | - privateBytes: number; |
3376 | | - /** |
3377 | | - * The amount of memory shared between processes, typically memory consumed by the |
3378 | | - * Electron code itself |
3379 | | - */ |
3380 | | - sharedBytes: number; |
3381 | | - /** |
3382 | | - * The amount of memory currently pinned to actual physical RAM. |
3383 | | - */ |
3384 | | - workingSetSize: number; |
3385 | | - } |
3386 | | - |
3387 | 3363 | interface MemoryUsageDetails { |
3388 | 3364 |
|
3389 | 3365 | // Docs: http://electronjs.org/docs/api/structures/memory-usage-details |
@@ -5919,6 +5895,22 @@ declare namespace Electron { |
5919 | 5895 | * Array of URLs. |
5920 | 5896 | */ |
5921 | 5897 | favicons: string[]) => void): this; |
| 5898 | + /** |
| 5899 | + * Fired when page title is set during navigation. explicitSet is false when title |
| 5900 | + * is synthesized from file url. |
| 5901 | + */ |
| 5902 | + on(event: 'page-title-updated', listener: (event: Event, |
| 5903 | + title: string, |
| 5904 | + explicitSet: boolean) => void): this; |
| 5905 | + once(event: 'page-title-updated', listener: (event: Event, |
| 5906 | + title: string, |
| 5907 | + explicitSet: boolean) => void): this; |
| 5908 | + addListener(event: 'page-title-updated', listener: (event: Event, |
| 5909 | + title: string, |
| 5910 | + explicitSet: boolean) => void): this; |
| 5911 | + removeListener(event: 'page-title-updated', listener: (event: Event, |
| 5912 | + title: string, |
| 5913 | + explicitSet: boolean) => void): this; |
5922 | 5914 | /** |
5923 | 5915 | * Emitted when a new frame is generated. Only the dirty area is passed in the |
5924 | 5916 | * buffer. |
|
0 commit comments