2021年1月26日星期二

Can no longer close current window with javascript

Until recently this worked in all browsers to close the current window:

window.open('','_self').close();

That no longer seems to be the case in Chrome, Firefox and Edge. I can fix it in Firefox by opening about:config and setting dom.allow_scripts_to_close_windows to true. Does anyone know of a remedy for the others?

https://stackoverflow.com/questions/65912751/can-no-longer-close-current-window-with-javascript January 27, 2021 at 12:06PM

没有评论:

发表评论