summaryrefslogtreecommitdiff
path: root/cli/js/ops/web_worker.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/ops/web_worker.ts')
-rw-r--r--cli/js/ops/web_worker.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/js/ops/web_worker.ts b/cli/js/ops/web_worker.ts
new file mode 100644
index 000000000..329323e2e
--- /dev/null
+++ b/cli/js/ops/web_worker.ts
@@ -0,0 +1,11 @@
+// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
+
+import { sendSync } from "./dispatch_json.ts";
+
+export function postMessage(data: Uint8Array): void {
+ sendSync("op_worker_post_message", {}, data);
+}
+
+export function close(): void {
+ sendSync("op_worker_close");
+}