Programmatically How to .js close current window OR drag Browser Tab to a separate instance?

Hello , TIA ,
I want to open a window/page to a specific size .
If I could do this : How to .js close current window
then I wouldn’t need this : drag Browser Tab to single instance .
So far can only close the window that .js created :

<h1>The Window Object</h1>
<h2>The open() and close() Methods</h2>

<button onclick="openWin()">Open "myWindow"</button>
<button onclick="closeWin()">Close "myWindow"</button>

let myWindow;

function openWin() {
  myWindow ="", "", "width=200,height=100");

function closeWin() {


But how to close parent window ? would save the day .

Well #1 I would say that’s a really bad user experience decision you’re making there.

#2: How to close the parent window? Have the child window call window.opener.close()

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.