remove webContents.openDevTools() deprecation
This commit is contained in:
parent
3deffa859d
commit
4a90056462
3 changed files with 0 additions and 22 deletions
|
@ -1300,11 +1300,6 @@ void WebContents::OpenDevTools(mate::Arguments* args) {
|
|||
mate::Dictionary options;
|
||||
if (args->GetNext(&options)) {
|
||||
options.Get("mode", &state);
|
||||
|
||||
// TODO(kevinsawicki) Remove in 2.0
|
||||
options.Get("detach", &detach);
|
||||
if (state.empty() && detach)
|
||||
state = "detach";
|
||||
}
|
||||
}
|
||||
managed_web_contents()->SetDockState(state);
|
||||
|
|
|
@ -40,15 +40,6 @@ ses.setCertificateVerifyProc(function (request, callback) {
|
|||
})
|
||||
```
|
||||
|
||||
## `webContents`
|
||||
|
||||
```js
|
||||
// Deprecated
|
||||
webContents.openDevTools({detach: true})
|
||||
// Replace with
|
||||
webContents.openDevTools({mode: 'detach'})
|
||||
```
|
||||
|
||||
## `webFrame`
|
||||
|
||||
```js
|
||||
|
|
|
@ -165,14 +165,6 @@ for (const method of webFrameMethodsWithResult) {
|
|||
}
|
||||
}
|
||||
|
||||
const nativeOpenDevTools = WebContents.prototype.openDevTools
|
||||
WebContents.prototype.openDevTools = function (params) {
|
||||
if (!process.noDeprecations && params && 'detach' in params) {
|
||||
deprecate.warn('webContents.openDevTools({detach: true})', `webContents.openDevTools({mode: 'detach'})`)
|
||||
}
|
||||
return nativeOpenDevTools.call(this, params)
|
||||
}
|
||||
|
||||
// Make sure WebContents::executeJavaScript would run the code only when the
|
||||
// WebContents has been loaded.
|
||||
WebContents.prototype.executeJavaScript = function (code, hasUserGesture, callback) {
|
||||
|
|
Loading…
Reference in a new issue