0

I'd like to sign out user and close browser/tab using JS. i tried below similar code but it take no effect on the latest chrome.

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

can you help me?

萧逸清
  • 165
  • 3
  • 11
  • [You can't close any tab via JavaScript. "This method is only allowed to be called for windows that were opened by a script using the window.open method." In other words, you can only use JavaScript to close a window/tab that was spawned via JavaScript.](https://stackoverflow.com/questions/2076299/how-to-close-current-tab-in-a-browser-window) – Alan Yu Nov 05 '21 at 07:06
  • my bro. that question is 10 years ago!! why you identify this as the same question? – 萧逸清 Nov 05 '21 at 07:10

0 Answers0