diff options
author | Eduardo Julian | 2018-01-29 20:27:39 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-01-29 20:27:39 -0400 |
commit | dc0bddf24a9c016756700b84e1905886fed1050b (patch) | |
tree | 7d03b362fa89f09604ee3adc032313c48ca0b2c3 /new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux | |
parent | caa10c162e5e830d61958532901a29337ee32b36 (diff) |
- Added "lux io exit" support for browsers running JS.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux | 8 |
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 |