I want to open a new window using javascript(window.open("some_url")
) and after some time i want to close that window. Is this possible using javascript?
Open the window, then use setTimeout
to close after some interval.
var newWindow = window.open("some_url");
setTimeout(() => newWindow.close(), 1000);