Adi – 09-52 Jun 26

Getting this error -> importscripts is not a function error…. when script is loaded through external source any idea??
UU
Unknown User662d ago
A
Adi662d 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.
UU
Unknown User662d ago
A
Adi662d 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.
UU
Unknown User662d ago