mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
feat: deprecate modules internally using remote.require in sandboxed renderer context (#15145)
This commit is contained in:
committed by
Alexey Kuzmin
parent
d5d1fa8290
commit
d561c5531b
@@ -19,7 +19,9 @@ const deprecate = {
|
||||
setHandler: (handler) => { deprecationHandler = handler },
|
||||
getHandler: () => deprecationHandler,
|
||||
warn: (oldName, newName) => {
|
||||
return deprecate.log(`'${oldName}' is deprecated. Use '${newName}' instead.`)
|
||||
if (!process.noDeprecation) {
|
||||
deprecate.log(`'${oldName}' is deprecated. Use '${newName}' instead.`)
|
||||
}
|
||||
},
|
||||
log: (message) => {
|
||||
if (typeof deprecationHandler === 'function') {
|
||||
|
||||
Reference in New Issue
Block a user