1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-01 16:51:13 -05:00
denoland-deno/cli/tests/if_main.ts

8 lines
227 B
TypeScript
Raw Normal View History

2019-02-12 21:14:02 -05:00
if (window.location.toString() == import.meta.url) {
console.log("main");
} else {
console.log("import.meta.url", import.meta.url);
console.log("window.location", window.location.toString());
throw Error("not main");
}