Is it possible to change browser tab on button click in JS or TS?


I have an AngularJS web app installed on a terminal and running in full-screen mode.

Customer asked to have 2 tabs opened at the same time on 2 different views – the 2 tabs won’t be active at the same time, one will be active and focused, while the other will run in background. The users need to be able to change the active tab when pressing a button in the view – like you do with CTRL+TAB on Windows. Like i said, the web app is running in full-screen so they are not seeing the tabs on top of the browser so they can’t change tabs this way.

The solution must work on the latest Chrome/Edge Chromium in addition to IE11, so extensions are out of the talk.

I spent the last hours doing researches until i found this answer which says:

It is not possible – due to security concerns.

But it was posted on april 2010, so i’m hoping something has changed.

I also saw the comment that says that there might be a way to do it with the ServiceWorker API but currently we don’t have it installed in our solution and i’d like to not change the structure of the project – anyway, if it is the only possible solution i could make a proposal for that.

Source: AngularJS Questions

Categorized as angularjs, browser, javascript, tabs, typescript Tagged , , , ,


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us