mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 07:44:48 -05:00
c49eee551f
This is the worker counterpart of PR #11062.
16 lines
409 B
TypeScript
16 lines
409 B
TypeScript
import { assert } from "../../../../test_util/std/testing/asserts.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);
|
|
};
|