diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-02-12 21:14:02 -0500 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-02-18 23:04:59 -0500 |
commit | 42408febe8cdf9e30ff8d1a3bb13f4994906c53b (patch) | |
tree | 92ab3408d426f1d18a511aa16130357ed074410a /tests/if_main.ts | |
parent | 27afbd135162b435c8af22b18622656ccab12174 (diff) |
Add window.location
Diffstat (limited to 'tests/if_main.ts')
-rw-r--r-- | tests/if_main.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/if_main.ts b/tests/if_main.ts new file mode 100644 index 000000000..b47066b2d --- /dev/null +++ b/tests/if_main.ts @@ -0,0 +1,7 @@ +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"); +} |