mirror of
https://github.com/denoland/deno.git
synced 2025-10-03 07:34:36 +00:00
Add web worker JS API (#1993)
* Refactored the way worker polling is scheduled and errors are handled. * Share the worker future as a Shared
This commit is contained in:
parent
659acadf77
commit
b0a23beb8f
28 changed files with 1013 additions and 257 deletions
|
@ -102,7 +102,16 @@ export type TextDecoder = textEncoding.TextDecoder;
|
|||
|
||||
window.performance = new performanceUtil.Performance();
|
||||
|
||||
// This variable functioning correctly depends on `declareAsLet`
|
||||
// in //tools/ts_library_builder/main.ts
|
||||
window.onmessage = workers.onmessage;
|
||||
|
||||
window.workerMain = workers.workerMain;
|
||||
window.workerClose = workers.workerClose;
|
||||
window.postMessage = workers.postMessage;
|
||||
|
||||
window.Worker = workers.WorkerImpl;
|
||||
export type Worker = workers.Worker;
|
||||
|
||||
// below are interfaces that are available in TypeScript but
|
||||
// have different signatures
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue