Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

322
Views
How to get the id of a tab created in the background, in Google Chrome

I'm writing an extension which needs to collect all the ids of newly created tabs. Using this snippet, I'm able to get an id of a tab that is created by just clicking "Add a new tab", as the browser autmatically displays it.

chrome.tabs.onCreated.addListener(() => {
    let [tab] = await chrome.tabs.query({ active: true, currentWindow: true });
    tabs.push(tab.id);
});

But what I'm struggling with, is to get the id of a tab that is created when you select to open a link in a new tab, as it doesn't set it as an active one, but rather stays on the same tab. Is there any option to get that? Thanks.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!