From dc0bddf24a9c016756700b84e1905886fed1050b Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 29 Jan 2018 20:27:39 -0400 Subject: - Added "lux io exit" support for browsers running JS. --- new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'new-luxc/source/luxc/lang/translation/js') 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 -- cgit v1.2.3