electron/renderer/api/lib/ipc.coffee

13 lines
312 B
CoffeeScript
Raw Normal View History

EventEmitter = require('events').EventEmitter
send = process.atom_binding('ipc').send
class Ipc extends EventEmitter
constructor: ->
process.on 'ATOM_INTERNAL_MESSAGE', (args...) =>
@emit('message', args...)
send: (args...) ->
send('ATOM_INTERNAL_MESSAGE', args...)
module.exports = new Ipc