I was trying to resize an HTML Canvas element to snugly in the browser window’s content area when the user resizes the window.
I ended up setting the browser window’s useContentSize to true. Then, when I call BrowserWindow.getSize() in response to a window resize, I subtract the content size from the window size to get the dimensions of the window’s chrome. Once I have the chrome dimensions, I subtract them from the window size on every resize to calculate the new canvas size.
It’s a roundabout way to get the webpage size, but it seems to work. It would be nice if BrowserWindow had a method that returns the size of the webpage.