diff --git a/atom/browser/web_contents_preferences.cc b/atom/browser/web_contents_preferences.cc index 1046a55b0579..49a81b3904c4 100644 --- a/atom/browser/web_contents_preferences.cc +++ b/atom/browser/web_contents_preferences.cc @@ -53,7 +53,6 @@ WebContentsPreferences::WebContentsPreferences( // Set WebPreferences defaults onto the JS object SetDefaultBoolIfUndefined(options::kPlugins, false); SetDefaultBoolIfUndefined(options::kExperimentalFeatures, false); - SetDefaultBoolIfUndefined(options::kExperimentalCanvasFeatures, false); bool node = SetDefaultBoolIfUndefined(options::kNodeIntegration, true); SetDefaultBoolIfUndefined(options::kNodeIntegrationInWorker, false); SetDefaultBoolIfUndefined(options::kWebviewTag, node); @@ -139,8 +138,6 @@ void WebContentsPreferences::AppendCommandLineSwitches( if (dict_.GetBoolean(options::kExperimentalFeatures, &b) && b) command_line->AppendSwitch( ::switches::kEnableExperimentalWebPlatformFeatures); - if (dict_.GetBoolean(options::kExperimentalCanvasFeatures, &b) && b) - command_line->AppendSwitch(::switches::kEnableExperimentalCanvasFeatures); // Check if we have node integration specified. bool node_integration = true; diff --git a/atom/common/options_switches.cc b/atom/common/options_switches.cc index f85d1a97c177..35e8f5e42cfc 100644 --- a/atom/common/options_switches.cc +++ b/atom/common/options_switches.cc @@ -118,7 +118,6 @@ const char kGuestInstanceID[] = "guestInstanceId"; // Web runtime features. const char kExperimentalFeatures[] = "experimentalFeatures"; -const char kExperimentalCanvasFeatures[] = "experimentalCanvasFeatures"; // Opener window's ID. const char kOpenerID[] = "openerId"; diff --git a/atom/common/options_switches.h b/atom/common/options_switches.h index fa8e7e8c4299..c0d8f6dcf272 100644 --- a/atom/common/options_switches.h +++ b/atom/common/options_switches.h @@ -61,7 +61,6 @@ extern const char kNodeIntegration[]; extern const char kContextIsolation[]; extern const char kGuestInstanceID[]; extern const char kExperimentalFeatures[]; -extern const char kExperimentalCanvasFeatures[]; extern const char kOpenerID[]; extern const char kScrollBounce[]; extern const char kEnableBlinkFeatures[]; diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 3536b6581a37..384f412254d0 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -305,8 +305,6 @@ It creates a new `BrowserWindow` with native properties as set by the `options`. * `plugins` Boolean (optional) - Whether plugins should be enabled. Default is `false`. * `experimentalFeatures` Boolean (optional) - Enables Chromium's experimental features. Default is `false`. - * `experimentalCanvasFeatures` Boolean (optional) - Enables Chromium's experimental - canvas features. Default is `false`. * `scrollBounce` Boolean (optional) - Enables scroll bounce (rubber banding) effect on macOS. Default is `false`. * `enableBlinkFeatures` String (optional) - A list of feature strings separated by `,`, like diff --git a/docs/tutorial/security.md b/docs/tutorial/security.md index fea66a1dee14..f00cf9b88a43 100644 --- a/docs/tutorial/security.md +++ b/docs/tutorial/security.md @@ -355,7 +355,7 @@ Content-Security-Policy: script-src 'self' https://apis.mydomain.com ### CSP HTTP Header Electron respects the [`Content-Security-Policy` HTTP header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) -which can be set using Electron's +which can be set using Electron's [`webRequest.onHeadersReceived`](../api/web-request.md#webrequestonheadersreceivedfilter-listener) handler: @@ -369,7 +369,7 @@ session.defaultSession.webRequest.onHeadersReceived((details, callback) => { ### CSP Meta Tag -CSP's preferred delivery mechanism is an HTTP header. It can be useful, however, +CSP's preferred delivery mechanism is an HTTP header. It can be useful, however, to set a policy on a page directly in the markup using a `` tag: ```html @@ -445,7 +445,7 @@ const mainWindow = new BrowserWindow({}) _Recommendation is Electron's default_ Advanced users of Electron can enable experimental Chromium features using the -`experimentalFeatures` and `experimentalCanvasFeatures` properties. +`experimentalFeatures` property. ### Why? diff --git a/lib/renderer/security-warnings.js b/lib/renderer/security-warnings.js index 033fcdb1c16b..c9649bbb374e 100644 --- a/lib/renderer/security-warnings.js +++ b/lib/renderer/security-warnings.js @@ -210,8 +210,7 @@ module.exports = { */ warnAboutExperimentalFeatures: () => { const webPreferences = getWebPreferences() - if (!webPreferences || (!webPreferences.experimentalFeatures && - !webPreferences.experimentalCanvasFeatures)) { + if (!webPreferences || (!webPreferences.experimentalFeatures)) { return }