DevTools-related methods are moved from BrowserWindow to WebContents

DevTools-related methods are no longer defined in `BrowserWindow`.

https://github.com/atom/electron/blob/master/docs/api/browser-window.md

Instead, they are defined in `WebContents`.

https://github.com/atom/electron/blob/master/docs/api/web-contents.md
This commit is contained in:
rhysd
2015-11-21 07:22:14 +09:00
parent 16134c168d
commit 31bef5ed02
2 changed files with 27 additions and 25 deletions
+21 -21
View File
@@ -343,27 +343,6 @@ declare module GitHubElectron {
* @returns Whether the window's document has been edited.
*/
isDocumentEdited(): boolean;
/**
* Opens the developer tools.
*/
openDevTools(options?: {
/**
* Opens devtools in a new window.
*/
detach?: boolean;
}): void;
/**
* Closes the developer tools.
*/
closeDevTools(): void;
/**
* Returns whether the developer tools are opened.
*/
isDevToolsOpened(): boolean;
/**
* Toggle the developer tools.
*/
toggleDevTools(): void;
reloadIgnoringCache(): void;
/**
* Starts inspecting element at position (x, y).
@@ -731,6 +710,27 @@ declare module GitHubElectron {
* data Buffer - PDF file content
*/
callback: (error: Error, data: Buffer) => void): void;
/**
* Opens the developer tools.
*/
openDevTools(options?: {
/**
* Opens devtools in a new window.
*/
detach?: boolean;
}): void;
/**
* Closes the developer tools.
*/
closeDevTools(): void;
/**
* Returns whether the developer tools are opened.
*/
isDevToolsOpened(): boolean;
/**
* Toggle the developer tools.
*/
toggleDevTools(): void;
/**
* Send args.. to the web page via channel in asynchronous message, the web page
* can handle it by listening to the channel event of ipc module.