Hi @hoseon-song ,
window.open('your current page URL', '_self', '');
window.close();edge browser not close.
I did some testing on this issue, and with reference to the relevant documentation, I think this result is reasonable. Just refer to this doc: the latest working spec for window close(). As metioned in this doc:
A browsing context is script-closable if it is an auxiliary browsing context that was created by a script (as opposed to by an action of the user), or if it is a top-level browsing context whose session history contains only one Document.
In my tests, the script you mentioned works correctly if the page is launched by Visual Studio or by the command line (created by script): msedge.exe www.google.com
. Conversely, pages opened manually by the user cannot be closed by script(not initial interface when opening browser ). This is all as described.
Regards,
Xudong Peng
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.