I'm just starting to play with Electron today. I need to be able to get the available window size, and to update it on the window resize.
It seems that this isn't as simple as it is in a conventional JS app. What's the recommended way for keeping track of the window size?
At the moment, I have my main process and a single renderer, with no plans to have more than 1 renderer/window open at a time.
I have tried to use the following, but it seems completely wrong so I must have misunderstood the docs.
const {BrowserWindow} = require('electron').remote
BrowserWindow.getSize()
EDIT:
Is it reasonable to keep track of the height by watching the body of the app? I can set this to 100% width/height and watch it, but it seems a bit of a hack.
Thanks Tom