trying to close a fullscreen window
I have setup everything related to the package.json file to allow the app to open in fullscreen, but when trying to call window.close() nothing happens? How am i supposed to reference the window API? What am I doing wrong?
An example of what I would like to do: Have the app launch in fullscreen initially, and then allow the user to press say the ESC key to close the window.
Thanks.
Tested node-webkit v0.3.5-pre on Windows XP and found that window.close() happily closes the initially fullscreen window.
What's your system and node-webkit version?
Thank-you for responding, I am using Windows 7 64-bit, and using node-webkit version v0.3.5. If you could provide some sample code as to how I close the fullscreen window that would be great.
Maybe this makes a difference, in the package.json file I am specifying a url (https://www.blah.com), instead of using a locally hosted file for main.
UPDATE: I tested using a local file, and that closes fine. I have actually used a bit of a hack that will close the window now ( window.open('', '_self'); window.close(); ).
Thanks
could you please try to do it with our native API: https://github.com/rogerwang/node-webkit/wiki/Window