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

179
Vistas
In JavaScript, what are the frequently used parameters "info" & "tab"?

While developing a Chrome extension and reading through the documentation found at https://developer.chrome.com/docs/extensions, I have seen the following syntax used and have been unable to find an explanation as to what the "info" or "tab" parameters(?) are for quite some time;

chrome.contextMenus.onClicked.addListener((info, tab) => {

"Info" and "tab" are then used like the below in various ways like they were a parent object or an interface;

var EncodedSelectedText = encodeURIComponent(info.selectionText).toString();

or

chrome.tabs.create({
    url: 'https://example.com/path?fragment'+EncodedSelectedText, index: tab.index + 1
});

They are not part of an interface, per the list of interfaces found on MDN here: https://developer.mozilla.org/en-US/docs/Web/API#interfaces (Unless I am missing something?)

This must have a simple explanation that I have been unable to find. Please, if someone could provide a link to the documentation about this on MDN or some other authoritative resource, it would be so very helpful.

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