sec: deprecate some webPreference defaults to be secure-by-default (#14284)

* feat: deprecate default value of nodeIntegration

* Use DeprecationStatus::Stable as the default instead of shadowing

* change wording of deprecations

* chore: also deprecate kWebviewTag and kContextIsolation

* chore: do as we preach, lets be secure-by-default in the default app
This commit is contained in:
Samuel Attard 2018-08-30 06:14:04 +12:00 committed by Charles Kerr
parent 9b2c14a745
commit 66d6ba8689
9 changed files with 100 additions and 43 deletions

View file

@ -293,6 +293,10 @@ WebContents.prototype._init = function () {
ipcMain.emit(channel, event, ...args)
})
this.on('-deprecated-default', function (event, key, oldDefault, newDefault) {
deprecate.warnDefault(key, oldDefault, newDefault)
})
// Handle context menu action request from pepper plugin.
this.on('pepper-context-menu', function (event, params, callback) {
// Access Menu via electron.Menu to prevent circular require.