neutralinojs / neutralino.js

JavaScript API for Neutralinojs
https://neutralino.js.org/docs/api/overview
MIT License
237 stars 47 forks source link

how to close a window without titlebar #87

Closed monsterkodi closed 7 months ago

monsterkodi commented 8 months ago

hello,

i can't figure out how to close a window from javascript code. (i am on a mac and have the windows titlebar disabled) i saw that there is some _close method on the windows cpp side, but that doesn't seem exposed to js.

thanks in advance for any help.

shalithasuranga commented 7 months ago

Hello.. thanks for using Neutralinojs. Please use the Neutralino.app.exit() function for closing the window. There is no window.close method since a Neutralinojs app typically consists of one native window. Please check the native API documentation more details: https://neutralino.js.org/docs/api/overview

monsterkodi commented 7 months ago

Thanks shalithasuranga for your reply.

I missed the part in the window.create documentation which states that every window is treated as a seperate app.

Coming from electron, i didn't expect that and I will try to wrap my head around the different concept.

This issue can be closed, i think i will soon come up with some new ones :)

So far I like working with neutralinojs. Thanks for providing it.

shalithasuranga commented 7 months ago

Hello @monsterkodi, welcome and thanks for using Neutralinojs :tada: