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

168
Views
Execute Script in Chrome Extension Page

I am writing a chrome extension and I want to executeScript in the extension page such as chrome-extension://URL. When I try to run the script in the extension page with:

chrome.tabs.executeScript( { code: `myFunc(${myVariable})` } );

in the extension page, I am getting the following error:

Unchecked runtime.lastError: Cannot access contents of url "chrome-extension://mcbaafjcjmpmjjbdpadcpenjmnkaneel/test.html". Extension manifest must request permission to access this host.

It looks like I cannot request permission for chrome-extension pages. Is there any workaround for this issue?

Note: I have tried to run the same command from the background.js file but I am getting the same error.

Thanks

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!