From 4a90056462635ac45a87dd30a92717ee9f8d0781 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 23 May 2018 09:30:15 -0700 Subject: [PATCH] remove webContents.openDevTools() deprecation --- atom/browser/api/atom_api_web_contents.cc | 5 ----- docs/tutorial/planned-breaking-changes.md | 9 --------- lib/browser/api/web-contents.js | 8 -------- 3 files changed, 22 deletions(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 7a578e153cba..682bd3f98950 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -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); diff --git a/docs/tutorial/planned-breaking-changes.md b/docs/tutorial/planned-breaking-changes.md index dc03ed6a2bf9..6cbba789eeeb 100644 --- a/docs/tutorial/planned-breaking-changes.md +++ b/docs/tutorial/planned-breaking-changes.md @@ -40,15 +40,6 @@ ses.setCertificateVerifyProc(function (request, callback) { }) ``` -## `webContents` - -```js -// Deprecated -webContents.openDevTools({detach: true}) -// Replace with -webContents.openDevTools({mode: 'detach'}) -``` - ## `webFrame` ```js diff --git a/lib/browser/api/web-contents.js b/lib/browser/api/web-contents.js index 96e0e16442c1..ccfc26d7c011 100644 --- a/lib/browser/api/web-contents.js +++ b/lib/browser/api/web-contents.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) {