compat: support --compat in web workers (#13629)

Adds another callback to WebWorkerOptions that allows to execute
some modules before actual worker code executes. This allows to set up Node
global using std/node.
This commit is contained in:
Bartek Iwańczuk 2022-02-11 13:41:56 +01:00 committed by GitHub
parent 2f2c778a07
commit 2fa0096821
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 194 additions and 19 deletions

View file

@ -676,7 +676,7 @@ delete Object.prototype.__proto__;
numCpus = cpuCount;
registerErrors();
pollForMessages();
globalThis.pollForMessages = pollForMessages;
const internalSymbol = Symbol("Deno.internal");