You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the atom-shell branch in Atom I'm trying to recreate the functionality of atom.getWindowState using ipc, but it is not working.
On the renderer side I use this code to retrieve data from the browser process:
dataFromBrowser=ipc.sendChannelSync('browser-data-request', 'THIS IS FROM THE RENDERER')
console.log'got this data from the browser', dataFromBrowser
Here is the code to listen for that event on the browser process (in main.coffee):
ipc.on'browser-data-request', (processId, messageId, message) ->console.log'browser got request', processId, messageId, message
ipc.sendChannel('window-state', processId, messageId, "THIS SOME DATA FROM THE BROWSER")
The browser ipc callback gets some strange params though, it gets:
{}21THIS IS FROM THE RENDERER[]
Also, the call to sendChannelSync doesn't return THIS IS SOME DATA FROM THE BROWSER it returns undefined.
Am I using this wrong?
Is there a better way to do this?
Activity
zcbenz commentedon May 16, 2013
The right way to listen for sync message in browser is:
This interface doesn't look very nice, but it's the easiest one to implement. I'll make the document more clear.
probablycorey commentedon May 16, 2013
It's working great now! Thanks!
Merge pull request #5 from atom/master
Merge pull request #5 from atom/master
Merge pull request #5 from heyunjiang/master
Persist cookies to disk
Update libchromiumcontent to get its Python scripts
Persist cookies to disk
Update libchromiumcontent to get its Python scripts
bump to 0.19.5 for #5
Merge pull request #5 from excfergodst/patch-6
Merge pull request #5 from kevinsawicki/detail-string
feat: add Linux support for `app.getApplicationInfoForProtocol()` (#5… (
test+fix(fingerprint): audio_data_strength is inert as a number; 63/6…