blob: ca16d4fa4fc35f24f922c11a3da6a87c577ee0ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import { assert } from "@std/assert/mod.ts";
onmessage = function (e) {
if (typeof self.Deno === "undefined") {
throw new Error("Deno namespace not available in worker");
}
assert(!Object.isFrozen(self.Deno));
const desc = Object.getOwnPropertyDescriptor(self, "Deno");
assert(desc);
assert(desc.configurable);
assert(!desc.writable);
postMessage(e.data);
};
|