I would like to minimize my app to the tray when the user presses close, similar to how Spotify operates. It doesn't have to a Windows system tray, but I do want my window to be closed.
However, the scripts in the webpage should be running so that a close behaves similarly to a minimize without a window.
Is there a way to do this besides keeping scripts in the manifest.json?
No way to do this.
The Close icon is system level. Codes in Chrome app can not work with it.
You can remove the native window controls using
chrome.app.window.create("any.html", { frame: "none" })
You can hide a window using
chrome.app.window.current().hide()
And show it using
chrome.app.window.current().show()
App Window Docs: https://developer.chrome.com/apps/app_window
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