Adi
Adi3y ago

Adi – 09-52 Jun 26

Getting this error -> importscripts is not a function error…. when script is loaded through external source any idea??
5 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Adi
AdiOP3y ago
for more info: I was able to serve this file (https://github.com/dbrennand/PS2Alert.me/blob/ac569e83efefec2f5e94d4a145a3756b7c6d0ecb/frontend/sw.js#L11) through nginx server as a static file but when I use self.importScripts() it throws error -> importScripts is not a function
GitHub
PS2Alert.me/sw.js at ac569e83efefec2f5e94d4a145a3756b7c6d0ecb · dbr...
Browser notifications for PlanetSide 2 alerts 🚨. Contribute to dbrennand/PS2Alert.me development by creating an account on GitHub.
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Adi
AdiOP3y ago
but I have application which already has service worker register file what I am doing is just injecting sw.js file script through nginx. By this -> service worker register file I mean to say code which does registration like this https://github.com/dbrennand/PS2Alert.me/blob/ac569e83efefec2f5e94d4a145a3756b7c6d0ecb/frontend/index.js#L56
GitHub
PS2Alert.me/index.js at ac569e83efefec2f5e94d4a145a3756b7c6d0ecb · ...
Browser notifications for PlanetSide 2 alerts 🚨. Contribute to dbrennand/PS2Alert.me development by creating an account on GitHub.
reactibot
reactibot3y ago
This thread hasn’t had any activity in 12 hours, so it’s now locked. Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/990555228409577532