mirror of
https://github.com/denoland/deno.git
synced 2024-11-29 16:30:56 -05:00
d2b5254c33
Re-attempt at #21284. I was more thorough this time. --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
16 lines
404 B
TypeScript
16 lines
404 B
TypeScript
import { assert } from "../../../../test_util/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);
|
|
};
|