summaryrefslogtreecommitdiff
path: root/cli/js/globals.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-01-21 09:49:47 +0100
committerGitHub <noreply@github.com>2020-01-21 09:49:47 +0100
commit7966bf14c062a05b1606a62c996890571454ecc8 (patch)
tree65bede64b47707c3accc80d0bb18e99840c639f7 /cli/js/globals.ts
parentc90036ab88bb1ae6b9c87d5e368f56d8c8afab69 (diff)
refactor: split worker and worker host logic (#3722)
* split ops/worker.rs into ops/worker_host.rs and ops/web_worker.rs * refactor js/workers.ts and factor out js/worker_main.ts - entry point for WebWorker runtime * BREAKING CHANGE: remove support for blob: URL in Worker * BREAKING CHANGE: remove Deno namespace support and noDenoNamespace option in Worker constructor * introduce WebWorker struct which is a stripped down version of cli::Worker
Diffstat (limited to 'cli/js/globals.ts')
-rw-r--r--cli/js/globals.ts11
1 files changed, 6 insertions, 5 deletions
diff --git a/cli/js/globals.ts b/cli/js/globals.ts
index 5754002c0..0f364b8e0 100644
--- a/cli/js/globals.ts
+++ b/cli/js/globals.ts
@@ -21,6 +21,7 @@ import * as textEncoding from "./text_encoding.ts";
import * as timers from "./timers.ts";
import * as url from "./url.ts";
import * as urlSearchParams from "./url_search_params.ts";
+import * as workerRuntime from "./worker_main.ts";
import * as workers from "./workers.ts";
import * as performanceUtil from "./performance.ts";
import * as request from "./request.ts";
@@ -194,12 +195,12 @@ const globalProperties = {
Response: nonEnumerable(fetchTypes.Response),
performance: writable(new performanceUtil.Performance()),
- onmessage: writable(workers.onmessage),
- onerror: writable(workers.onerror),
+ onmessage: writable(workerRuntime.onmessage),
+ onerror: writable(workerRuntime.onerror),
- workerMain: nonEnumerable(workers.workerMain),
- workerClose: nonEnumerable(workers.workerClose),
- postMessage: writable(workers.postMessage),
+ workerMain: nonEnumerable(workerRuntime.workerMain),
+ workerClose: nonEnumerable(workerRuntime.workerClose),
+ postMessage: writable(workerRuntime.postMessage),
Worker: nonEnumerable(workers.WorkerImpl),
[domTypes.eventTargetHost]: nonEnumerable(null),