Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

319
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda