Exemple #1
0
 public static void main(String[] args) {
   // Initialize and start it with JS Simulation Core
   Js.init(Core.get());
   new Arrays().start();
   // Re-compile the class into JavaScript code
   new Scriptlets("jsdemo-1.0/core/lang").add(Arrays.class).recompile();
 }
 // @Override
 public final synchronized JsObject var() {
   if (Core.isRunning()) {
     return JsGlobal.Object.with().create(this);
   } else {
     JsObject o = JsGlobal.Object.with().create();
     for (Mid mid : map.keySet()) {
       o.var(mid, var(mid));
     }
     return o;
   }
 }