This is needed in order to allow show/hide to have proper return of focus
https://github.com/electron/electron/issues/2640
Alternatively expose an API to do this
We do this? decorateMenu ?
@rauchg negative, at least as far as I can tell... we need to be able to Menu.sendActionToFirstResponder('hide:');
OH. I think it'd be cool to pass { electron } as the second parameter for all the browser hooks. What do you think ?
Kinda like we pass { React } to all the renderer ones
{ electron, app }
Seems to me that this should work for this and many other use-cases 馃槉
Dude, i just came to realise something when i checked out the code in hyperterm-overlay
The package.json specifies [email protected], which isn't right, but the thing that's really cool (but a bit unexpected) is that electron always return internal module when requiring electron! 馃挜 ,
So no need for sending the electron over to plugins, just document that they can do
const electron = require('electron')
const { dialog, Menu } = require('electron')
Yes, we need to document this, because as a plugin author I tried to not requiring electron because it is a big dependency. If I knew that...
Most helpful comment
Dude, i just came to realise something when i checked out the code in hyperterm-overlay
The package.json specifies [email protected], which isn't right, but the thing that's really cool (but a bit unexpected) is that electron always return internal module when requiring electron! 馃挜 ,
So no need for sending the electron over to plugins, just document that they can do
const electron = require('electron')const { dialog, Menu } = require('electron')