I'm trying to build a node-webkit app, currently I'm experimenting on package.json
Here is the contents so far:
{
"name": "nw-demo",
"main": "index.html",
"window": {
"title": "node-webkit demo",
"icon": "icon.png",
"toolbar": false,
"frame": true,
"fullscreen": true
}
}
How do I make my node-webkit app load on fullscreen?
Docs says:
(boolean) whether window is fullscreen (available after node-webkit v0.3.0)
So why didn't the above package.json
work?
Confirmed. Full screen on v0.10.5 (node.js v0.11.13-pre) doesn't work for me either on Windows. I can notice it attempts to full screen but then goes back to a window for some reason.
This isn't an ideal answer, but this is a workaround I've been using:
<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
<script>
var ngui = require('nw.gui');
var nwin = ngui.Window.get();
nwin.enterFullscreen();
</script>
</body>
</html>
Full screen still works via the JavaScript call.
Nw.js has a special kiosk
mode:
{
"name": "nw-demo",
"main": "index.html",
"window": {
"title": "node-webkit demo",
"icon": "icon.png",
"toolbar": false,
"frame": true,
"kiosk": true // set kiosk mode true
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With