2023 Google Chrome is there a way to close a tab from Javascript / html / extension?

I’ve searched the web but didn’t find any solution till now.
I need to close the tab in Google Chrome from a button inside the page, I am calling this page directly from the adressbar but I can’t close it 🙁
… that was so simple in the “old” days window.close and done .. but now .. how can I close the tab from a button inside the page? We are using chrome to show som information and nee to close the tab from the page itself and on touchscreens the little x-mark is useless at the tab…
Thank you!

Stev