added top-level "environment" associative array - which provides JavaScript access to Java System properties.
git-svn-id: svn://10.0.0.236/trunk@33757 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
a640fc495b
commit
7e586f42e5
@ -100,7 +100,14 @@ public class Main extends ScriptableObject {
|
||||
Scriptable argsObj = cx.newArray(global, array);
|
||||
global.defineProperty("arguments", argsObj,
|
||||
ScriptableObject.DONTENUM);
|
||||
|
||||
|
||||
// Set up "environment" in the global scope to provide access to the
|
||||
// System environment variables.
|
||||
Environment.defineClass(sharedGlobal);
|
||||
Environment environment = new Environment(global);
|
||||
global.defineProperty("environment", environment,
|
||||
ScriptableObject.DONTENUM);
|
||||
|
||||
/*
|
||||
TODO: enable debugger
|
||||
if (global.debug) {
|
||||
|
||||
@ -100,7 +100,14 @@ public class Main extends ScriptableObject {
|
||||
Scriptable argsObj = cx.newArray(global, array);
|
||||
global.defineProperty("arguments", argsObj,
|
||||
ScriptableObject.DONTENUM);
|
||||
|
||||
|
||||
// Set up "environment" in the global scope to provide access to the
|
||||
// System environment variables.
|
||||
Environment.defineClass(sharedGlobal);
|
||||
Environment environment = new Environment(global);
|
||||
global.defineProperty("environment", environment,
|
||||
ScriptableObject.DONTENUM);
|
||||
|
||||
/*
|
||||
TODO: enable debugger
|
||||
if (global.debug) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user