electron: BrowserWindow backgroundColor does not work as expected
- Electron version: 2.0.0-beta.3
- Operating system: macOS 10.13.3
Expected behavior
BrowserWindow should start with the background color as specified with backgroundColor option and stays with the same background color after the content loads.
Actual behavior
BrowserWindow starts with the correct background color but quickly reset to white background color.

How to reproduce
new BrowserWindow({
backgroundColor: "#F7C136"
});
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (8 by maintainers)
Sorry to open an old case, but this also happened exactly the same on Electron version ^19.0.4
https://user-images.githubusercontent.com/37969970/175072375-95bcd87d-c8c6-4f5b-90fe-e341bee11f2a.mov
As far as I see, the webContents/Preferences are deduced from the renderer process id. With affinity, we can have several pages hosted in the same renderer process id. So currently, it returns always the same webContents for pages sharing the same process. This design must be changed and we have to get the webContents for a specific page (rendererFrame?).