new Worker(browser.runtime.getURL('source/worker.js'))
throws an error:
Error: This script should only be loaded in a browser extension.
I have a hefty background processing operation that I need to pass off to a web worker, but the script I try to execute causes this error.
Is there a standard way of spawning a web worker in a background script for a safari web extension?