1

I would like to know if it would be possible to check the existence of a tab with pure javascript. I know how to do this with a chrome extension but I'm wondering if it's possible with JS.

Creating the tab:

window.open("https://www.google.com", 'mytab'); 

Can I check if "mytab" is open ? And if it is open, does it have the focus? Using window.open may be blocked by pop-up blockers and because of this, I don't know if the tab has been opened.

My gut feeling tells me it's not possible with pure JS but I'm not an expert, that's why I'm asking. I have checked this on stackoverflow but I see mainly solution with a browser extension.

If know another work around, I'm also interested.

Thanks

0

1 Answer 1

0

The only thing I know of would be to implicitly check via if your page still has visibility / focus so this answer may help you further.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.