remote-web-worker
Advanced tools
Comparing version
{ | ||
"name": "remote-web-worker", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Cross origin web worker", | ||
@@ -5,0 +5,0 @@ "author": "Jan Nicklas", |
# Remote Worker | ||
[Leightweight (~300b)][1] Worker patch to allow loading scripts from remote URLs | ||
[Leightweight (~0.3kb)][1] Worker patch to allow loading scripts from remote URLs (cross-origin). | ||
## Motivation | ||
This patch allows to host Web Worker scripts on CDN servers without the following exceptions: | ||
- `"Uncaught DOMException: Failed to construct 'Worker': Script at 'https://cdn.jsdelivr.net/npm/console-log-hello-world' cannot be accessed from origin 'http://localhost:8080'."` | ||
- `"Uncaught (in promise) DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://cdn.jsdelivr.net/npm/console-log-hello-world' failed to load.` | ||
## Installation | ||
@@ -7,0 +13,0 @@ |
14881
2.76%57
11.76%80
-2.44%