Getting number to open tabs in browser using JS

How to get list of all open tabs in a browser using js.
Please Help
Struck with this

What browser are you trying to write an extension for? It will have its own API, with it’s own documentation for that

1 Like

I was trying to get the tabs on google chrome browser
but want the same for mutiple browsers

Tabs API for writing Chrome extensions

Same for extensions for all Chromium browsers, so that’s Google Chrome, MS Edge, Opera etc.

Tabs API for Firefox extensions is almost identical

No idea re Safari.

Extensions are normally specific to a specific browser. You install them onto your browser. So afaik you’d need to write one for each browser even if they use the same API

Edit: if you mean “how do I get the number of tabs open by using JS code in my webpage/webapp”, well, you can’t do that. If that is what you mean, JS in a browser context affects a webpage, it cannot affect anything else on the computer it’s running on.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.