Multiple BrowserWindows in an app


I have an app [running in OSX] where a user can launch multiple BrowserWindows. In the main process I also set the menu for the application [as in OS X, you can’t have per window menu]

Is there a way to figure out which BrowserWindow is in focus (selected), so that the menu items have a context to apply their actions to. Else I don’t know which BrowserWindow to apply the action to.

Any help would be appreciated.



Sounds like BrowserWindow.getFocusedWindow() may be what you’re looking for.


Thanks a lot @john! Oversight on my part.