Ejemplo n.º 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();
 }
Ejemplo n.º 2
0
 // @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;
   }
 }