mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
// Type definitions for Electron v0.37.2
|
|
// Project: http://electron.atom.io/
|
|
// Definitions by: jedmao <https://github.com/jedmao/>, rhysd <https://rhysd.github.io>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
declare namespace Electron {
|
|
|
|
class BrowserWindowProxy {
|
|
/**
|
|
* Removes focus from the child window.
|
|
*/
|
|
blur(): void;
|
|
/**
|
|
* Forcefully closes the child window without calling its unload event.
|
|
*/
|
|
close(): void;
|
|
/**
|
|
* Set to true after the child window gets closed.
|
|
*/
|
|
closed: boolean;
|
|
/**
|
|
* Evaluates the code in the child window.
|
|
*/
|
|
eval(code: string): void;
|
|
/**
|
|
* Focuses the child window (brings the window to front).
|
|
*/
|
|
focus(): void;
|
|
/**
|
|
* Sends a message to the child window with the specified origin or * for no origin preference.
|
|
* In addition to these methods, the child window implements window.opener object with no
|
|
* properties and a single method.
|
|
*/
|
|
postMessage(message: string, targetOrigin: string): void;
|
|
}
|
|
|
|
interface Window {
|
|
/**
|
|
* Creates a new window.
|
|
* @returns An instance of BrowserWindowProxy class.
|
|
*/
|
|
open(url: string, frameName?: string, features?: string): BrowserWindowProxy;
|
|
}
|
|
|
|
interface File {
|
|
/**
|
|
* Exposes the real path of the filesystem.
|
|
*/
|
|
path: string;
|
|
}
|
|
}
|