The following code can use the F11 hot key, so that the browser window full screen, how to achieve the second press the F11 hot key, restore the original window size?
<!DOCTYPE html>
<html>
<head>
<script>
nw.App.registerGlobalHotKey(new nw.Shortcut({
key: "F11",
active: function () {
// decide whether to leave fullscreen mode
// then ...
nw.Window.get().enterFullscreen();
}
}));
</script>
</head>
<body>
</body>
</html>