Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

318
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda