small tune of IPC interface.
This commit is contained in:
parent
d28f51fb9c
commit
8f0b2b6363
8 changed files with 25 additions and 21 deletions
|
@ -4,12 +4,12 @@ send = process.atom_binding('ipc').send
|
|||
class Ipc extends EventEmitter
|
||||
constructor: ->
|
||||
process.on 'ATOM_INTERNAL_MESSAGE', (args...) =>
|
||||
@emit('message', args...)
|
||||
@emit(args...)
|
||||
|
||||
send: (args...) ->
|
||||
@sendChannel('ATOM_INTERNAL_MESSAGE', args...)
|
||||
@sendChannel('message', args...)
|
||||
|
||||
sendChannel: (args...) ->
|
||||
send(args...)
|
||||
send('ATOM_INTERNAL_MESSAGE', args...)
|
||||
|
||||
module.exports = new Ipc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue