Hi @Devos2022 ,
Ordinary javascript cannot close windows willy-nilly. If you want to use js to close the windows,you must open it first. One way,you could use Chrome extension.Just like this:
chrome.windows.remove(integer windowId, function callback)
Another,if you use the old Chrome,you could do like this:
open(location, '_self').close();
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.