app: add will-download event to defaultSession
This commit is contained in:
parent
0f2ef3feb2
commit
aed487ef40
5 changed files with 77 additions and 4 deletions
|
@ -32,8 +32,10 @@ app.setAppPath = (path) ->
|
|||
app.getAppPath = ->
|
||||
appPath
|
||||
|
||||
# Be compatible with old API.
|
||||
app.once 'ready', -> @emit 'finish-launching'
|
||||
app.once 'ready', ->
|
||||
app.defaultSession.__proto__ = EventEmitter.prototype
|
||||
# Be compatible with old API.
|
||||
@emit 'finish-launching'
|
||||
app.terminate = app.quit
|
||||
app.exit = process.exit
|
||||
app.getHomeDir = -> @getPath 'home'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue