From addd482a5bc764e67b3d5c6f4b42b1f45de28fa7 Mon Sep 17 00:00:00 2001 From: rhysd Date: Sat, 21 Nov 2015 07:20:04 +0900 Subject: [PATCH] github-electron: Add addWorkSpace() and removeWorkSpace to WebContents --- github-electron/github-electron-main-tests.ts | 2 ++ github-electron/github-electron.d.ts | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/github-electron/github-electron-main-tests.ts b/github-electron/github-electron-main-tests.ts index 8a4dcced86..411c85f564 100644 --- a/github-electron/github-electron-main-tests.ts +++ b/github-electron/github-electron-main-tests.ts @@ -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', () => { diff --git a/github-electron/github-electron.d.ts b/github-electron/github-electron.d.ts index cc9099489b..2d78448130 100644 --- a/github-electron/github-electron.d.ts +++ b/github-electron/github-electron.d.ts @@ -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. */