simple-web-worker
simple-web-worker copied to clipboard
when i depend on others lib in worker
as the title when i depend on crypto-js in worker. What should I do? use importScripts?
~@israelss yeah. Is importScripts supported on this library?~
@npm-ued try referencing it inside self in the worker function.
It seems like importScripts is not supported ;(
I try this code inside worker function:
importScripts('scripts/lib.js')
self.importScripts('scripts/lib.js')
and I get Uncaught SyntaxError: Failed to execute 'importScripts' on 'WorkerGlobalScope'