aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux8
1 files changed, 7 insertions, 1 deletions
diff --git a/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux
index 445aa6f00..849ff67d0 100644
--- a/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux
@@ -396,7 +396,13 @@
(def: (io//exit codeJS)
Unary
- (format "(process && process.exit && process.exit(" (int//to-frac codeJS) "))"))
+ (format "("
+ (format "(!((typeof process) === \"undefined\") && process.exit && process.exit(" (int//to-frac codeJS) "))")
+ " || "
+ "window.close()"
+ " || "
+ "location.reload()"
+ ")"))
(def: (io//current-time [])
Nullary