This is an asynchronous function that returns a Promise. Self.html Here you can link where you want, but every site needs the scriptĭocument.querySelectorAll("a"). Mozilla tabs.remove () English (US) tabs.remove () Closes one or more tabs. planetmaker at 8:52 Add a comment 6 Answers Sorted by: 14 window.close method is only allowed to be called for windows that were opened by a script using the window.open method.
CLOSE TAB BROWSER JAVASCRIPT FULL
Windows are opened with window.open () full syntax here Windows are closed with window.close () full syntax here (but not always) This is where the MDN statement comes into play. 1 I would not bet that javascript can always close a tab as it's most likely linked to browser security settings.