mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
16 lines
367 B
CoffeeScript
16 lines
367 B
CoffeeScript
EventEmitter = require('events').EventEmitter
|
|
send = process.atom_binding('ipc').send
|
|
|
|
class Ipc extends EventEmitter
|
|
constructor: ->
|
|
process.on 'ATOM_INTERNAL_MESSAGE', (args...) =>
|
|
@emit(args...)
|
|
|
|
send: (args...) ->
|
|
@sendChannel('message', args...)
|
|
|
|
sendChannel: (args...) ->
|
|
send('ATOM_INTERNAL_MESSAGE', args...)
|
|
|
|
module.exports = new Ipc
|