Button shall close WebTab

Hi guys, it is possible to add a clickListener to a button which leads to closing the tab of the Vaadin application?
As you can see in the picture; I have a button and I want to close the current tab or if possible to exit the application. And the same goes to the button in the middle. When I press this tab, I want the whole browser (e.g. Chrome) to be minimized - or if I use a PWA the PWA shall get minimized.

I already have tried to invoke JS and execute a method which contains window.close() - but this does not work anymore.

Thanks a lot in advantage!
image.png

You can’t manipulate the browser from within a webpage like this. (There are ancient workarounds and technics, but none are stable or even future proof)

Thanks a lot