Use anonymous function for wrapping native classes
This commit is contained in:
parent
0785c3bd15
commit
e5036c0988
1 changed files with 2 additions and 4 deletions
|
@ -51,12 +51,10 @@ for (let name of events) {
|
|||
}
|
||||
|
||||
// Wrappers for native classes.
|
||||
const wrapDownloadItem = (downloadItem) => {
|
||||
downloadItemBindings._setWrapDownloadItem((downloadItem) => {
|
||||
// downloadItem is an EventEmitter.
|
||||
Object.setPrototypeOf(downloadItem, EventEmitter.prototype)
|
||||
}
|
||||
|
||||
downloadItemBindings._setWrapDownloadItem(wrapDownloadItem)
|
||||
})
|
||||
|
||||
// Only one App object pemitted.
|
||||
module.exports = app
|
||||
|
|
Loading…
Reference in a new issue