replace __proto__ with Object.setPrototype
This commit is contained in:
parent
2c3cacdc08
commit
4e2f1311e0
10 changed files with 12 additions and 12 deletions
|
@ -9,7 +9,7 @@ const bindings = process.atomBinding('app')
|
|||
const downloadItemBindings = process.atomBinding('download_item')
|
||||
const app = bindings.app
|
||||
|
||||
app.__proto__ = EventEmitter.prototype
|
||||
Object.setPrototypeOf(app, EventEmitter.prototype)
|
||||
|
||||
app.setApplicationMenu = function (menu) {
|
||||
return Menu.setApplicationMenu(menu)
|
||||
|
@ -102,7 +102,7 @@ deprecate.event(app, 'select-certificate', 'select-client-certificate')
|
|||
// Wrappers for native classes.
|
||||
var wrapDownloadItem = function (downloadItem) {
|
||||
// downloadItem is an EventEmitter.
|
||||
downloadItem.__proto__ = EventEmitter.prototype
|
||||
Object.setPrototypeOf(downloadItem, EventEmitter.prototype)
|
||||
|
||||
// Deprecated.
|
||||
deprecate.property(downloadItem, 'url', 'getURL')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue