github-electron: Add addWorkSpace() and removeWorkSpace to WebContents

This commit is contained in:
rhysd
2015-11-21 07:20:04 +09:00
parent 31bef5ed02
commit addd482a5b
2 changed files with 10 additions and 0 deletions

View File

@@ -65,6 +65,8 @@ app.on('ready', () => {
mainWindow.webContents.toggleDevTools();
mainWindow.webContents.openDevTools({detach: true});
mainWindow.webContents.closeDevTools();
mainWindow.webContents.addWorkSpace('/path/to/workspace');
mainWindow.webContents.removeWorkSpace('/path/to/workspace');
var opened: boolean = mainWindow.webContents.isDevToolsOpened()
// Emitted when the window is closed.
mainWindow.on('closed', () => {

View File

@@ -710,6 +710,14 @@ declare module GitHubElectron {
* data Buffer - PDF file content
*/
callback: (error: Error, data: Buffer) => void): void;
/**
* Adds the specified path to DevTools workspace.
*/
addWorkSpace(path: string): void;
/**
* Removes the specified path from DevTools workspace.
*/
removeWorkSpace(path: string): void;
/**
* Opens the developer tools.
*/