From 1206689caab0e719643859b7984059d4af322e24 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 16 May 2017 14:37:10 -0700 Subject: [PATCH] Update to electron.d.ts@1.7.1 --- npm/electron.d.ts | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/npm/electron.d.ts b/npm/electron.d.ts index fc32d23f4878..1e1f2e3afb3e 100644 --- a/npm/electron.d.ts +++ b/npm/electron.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Electron 1.6.10 +// Type definitions for Electron 1.7.1 // Project: http://electron.atom.io/ // Definitions by: The Electron Team // Definitions: https://github.com/electron/electron-typescript-definitions @@ -2199,16 +2199,16 @@ declare namespace Electron { * Shows a message box, it will block the process until the message box is closed. * It returns the index of the clicked button. The browserWindow argument allows * the dialog to attach itself to a parent window, making it modal. If a callback - * is passed, the API call will be asynchronous and the result will be passed via - * callback(response). + * is passed, the dialog will not block the process. The API call will be + * asynchronous and the result will be passed via callback(response). */ showMessageBox(browserWindow: BrowserWindow, options: MessageBoxOptions, callback?: (response: number, checkboxChecked: boolean) => void): number; /** * Shows a message box, it will block the process until the message box is closed. * It returns the index of the clicked button. The browserWindow argument allows * the dialog to attach itself to a parent window, making it modal. If a callback - * is passed, the API call will be asynchronous and the result will be passed via - * callback(response). + * is passed, the dialog will not block the process. The API call will be + * asynchronous and the result will be passed via callback(response). */ showMessageBox(options: MessageBoxOptions, callback?: (response: number, checkboxChecked: boolean) => void): number; /** @@ -4627,6 +4627,15 @@ declare namespace Electron { url: string) => void): this; removeListener(event: 'will-navigate', listener: (event: Event, url: string) => void): this; + /** + * Emitted when a beforeunload event handler is attempting to cancel a page unload. + * Calling event.preventDefault() will ignore the beforeunload event handler and + * allow the page to be unloaded. + */ + on(event: 'will-prevent-unload', listener: (event: Event) => void): this; + once(event: 'will-prevent-unload', listener: (event: Event) => void): this; + addListener(event: 'will-prevent-unload', listener: (event: Event) => void): this; + removeListener(event: 'will-prevent-unload', listener: (event: Event) => void): this; /** * Adds the specified path to DevTools workspace. Must be used after DevTools * creation: @@ -4730,6 +4739,7 @@ declare namespace Electron { */ findInPage(text: string, options?: FindInPageOptions): void; getFrameRate(): number; + getOSProcessId(): number; getTitle(): string; getURL(): string; getUserAgent(): string; @@ -7648,6 +7658,10 @@ declare namespace Electron { * currently experimental and may change or be removed in future Electron releases. */ contextIsolation?: boolean; + /** + * Whether to use native window.open(). Defaults to false. + */ + nativeWindowOpen?: boolean; } interface DefaultFontFamily {