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

145
Views
Chrome addons (plugins) javascript files seem isolated

I have created an unpacked plugin for Chrome (that also works in Firefox), that has a single script.js file. And it works.

However, trying to call a function included in the addon's script.js file from the console results in:

Uncaught ReferenceError: _islet_convert is not defined
at <anonymous>:1:1

(anonymous) @ VM259:1

Which by the way I tested just to verify with not_a_function() in the console, and the error was the same.

Can someone tell me how Chrome and probably Firefox handles or isolates the JavaScript in the content_scripts files? And if there is any way to reference a function/method in the file.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

From the documentation in Chrome:

https://developer.chrome.com/docs/extensions/mv2/content_scripts/

Content scripts live in an isolated world, allowing a content script to makes changes to its JavaScript environment without conflicting with the page or additional content scripts.

...

Isolated worlds do not allow for content scripts, the extension, and the web page to access any variables or functions created by the others. This also gives content scripts the ability to enable functionality that should not be accessible to the web page.

Essentially, it appears any communication needs to happen through the DOM including adding event listeners.

about 4 years ago · Juan Pablo Isaza Report
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!