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

105
Views
importScripts fails for Safari web extension

I'm porting a working v3 chrome extension to Safari on MacOS. In my background (service worker) script I call

self.importScripts("Platform.js");

which should load said JavaScript file. It's in the same folder as the script that calls it.

But this fails in Safari (not chrome) with the error:

Failed to load resource: unsupported URL safari-web-extension://FE580C4D-9931-4639-ABF9-...../Platform.js

(dots substituted for the last hex digits). In the manifest I have the lines:

"web_accessible_resources": [
    {
      "resources": ["Platform.js"],
      "matches": ["<all_urls>"]
    },...

I'm following the instructions for converting a web extension to Safari. I'm running MacOS Monterey, Safari 15.5.

Any pointers as to what I might need to try would be appreciated. I thought of statically importing the code but it's not a JavaScript module.

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!