added first support for JavaScript this and arguments

This commit is contained in:
Renaud Pawlak 2017-05-02 05:41:11 +02:00
parent 21a4cad82b
commit e39515891a
2 changed files with 30 additions and 0 deletions

View File

@ -648,4 +648,19 @@ public final class Lang {
EXPORTED_VARS.get().put("_exportedVar_" + name, value);
}
/**
* Accesses the current method arguments (<code>arguments</code> implicit variable in
* JavaScript).
*/
public static final Object[] arguments = null;
/**
* Accesses the current JavaScript <code>this</code>. Within an object
* scope, <code>$this</code> corresponds to a regular object oriented
* <code>this</code>. Outside on an object (i.e. within a global function),
* <code>$this</code> has the JavaScript meaning, representing the current
* function object.
*/
public static final Object $this = null;
}

View File

@ -648,4 +648,19 @@ public final class Lang {
EXPORTED_VARS.get().put("_exportedVar_" + name, value);
}
/**
* Accesses the current method arguments (arguments implicit variable in
* JavaScript).
*/
public static final Object[] arguments = null;
/**
* Accesses the current JavaScript <code>this</code>. Within an object
* scope, <code>$this</code> corresponds to a regular object oriented
* <code>this</code>. Outside on an object (i.e. within a global function),
* <code>$this</code> has the JavaScript meaning, representing the current
* function object.
*/
public static final Object $this = null;
}