Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added "other engine" detection so I can get an exit code from v8

  • Loading branch information...
commit efe43ed3001867f101ea4dae74e716be55f2720f 1 parent 4a98b0c
Alex Young authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 riot.js
View
12 riot.js
@@ -18,6 +18,14 @@ var Riot = {
java.lang.System.exit(Riot.exitCode);
break;
+ case 'non-browser-interpreter':
+ Riot.formatter = new Riot.Formatters.Text();
+ Riot.runAndReport(tests);
+ if (typeof quit !== 'undefined') {
+ quit(Riot.exitCode);
+ }
+ break;
+
case 'browser':
Riot.formatter = new Riot.Formatters.HTML();
var onload = window.onload;
@@ -36,8 +44,10 @@ var Riot = {
if (typeof XPCOMCore !== 'undefined') {
return 'xpcomcore';
- } else if (typeof window === 'undefined') {
+ } else if (typeof window === 'undefined' && typeof java !== 'undefined') {
return 'rhino';
+ } else if (typeof window === 'undefined') {
+ return 'non-browser-interpreter';
} else {
return 'browser';
}
Please sign in to comment.
Something went wrong with that request. Please try again.