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

189
Views
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
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!