6

In node-webkit, how can I set the background color of the window while the page is loading? It seems to always be white, but I would either like it to be transparent, or (in my case) a shade of green.

I've tried setting transparent: true in the window option of package.json, but it doesn't seem to have any effect.

Michal Charemza
  • 25,940
  • 14
  • 98
  • 165

1 Answers1

2

Taking from the answers at https://groups.google.com/forum/#!topic/node-webkit/NxhJ4dO80Gc you can avoid showing the window on load by setting the show option in package.json

"window": {
  "show" false
}

And then once the application has loaded, you can use

var win = gui.Window.get();
win.show();

to show the window.

However, when combined with kiosk mode, then the behaviour of this isn't quite as nice as I would like, at least on a mac, as there are appearances of full-screen black or white before the window is shown.

Michal Charemza
  • 25,940
  • 14
  • 98
  • 165