forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgithub-electron.dom.d.ts
51 lines (47 loc) · 1.29 KB
/
github-electron.dom.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// 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;
}
}