Update docs for webContents.addWorkSpace
Specify that webContents.addWorkSpace cannot be called before DevTools creation and include example. Fix: #3536
This commit is contained in:
parent
42454b07d0
commit
62c65280a1
1 changed files with 8 additions and 1 deletions
|
@ -499,7 +499,14 @@ win.webContents.on("did-finish-load", function() {
|
|||
|
||||
* `path` String
|
||||
|
||||
Adds the specified path to DevTools workspace.
|
||||
Adds the specified path to DevTools workspace. Must be used after DevTools
|
||||
creation:
|
||||
|
||||
```javascript
|
||||
mainWindow.webContents.on('devtools-opened', function() {
|
||||
mainWindow.webContents.addWorkSpace(__dirname);
|
||||
});
|
||||
```
|
||||
|
||||
### `webContents.removeWorkSpace(path)`
|
||||
|
||||
|
|
Loading…
Reference in a new issue