I use NWJS as an screensaver slideshow.
I'd want to be able to specify the initial background color of the window in the manifest file. Right now NWJS starts with an white background (few Milliseconds) until the index.html is loaded, which sets the color to black.
Example
{
"main": "index.html",
"name": "nw-demo",
"window": {
"title": "node-webkit demo",
"background-color": "#000000"
}
}
The good thing is that it is possible to set that initial background color although I don't think NW.js supports it yet. Maybe @rogerwang can look at how Electron does it.
Will support this. Thanks.
:ok_hand: Thanks
We can include "transparent" as an option? Or "none" to be hidden until the first HTML load? = )
@rogerwang any news about this feature?
I see sometime the app stucks into a white screen (before to load the DOM), so we have no chance to put some kind of loader, it could be nice to have at least a background color/image.
merge this issue with #5502
first, in the file package.json, window: { show: false }
second, <body style='background-color:xxx'>
finally, when index.html loaded, run the following code
require('nw.gui').Window.get().show;
Most helpful comment
@rogerwang any news about this feature?
I see sometime the app stucks into a white screen (before to load the DOM), so we have no chance to put some kind of loader, it could be nice to have at least a background color/image.