Convenient method to convert java value to its closest representation in JavaScript. If value is an instance of String, Number, Boolean, Function or Scriptable, it is returned as it and will be treated as the corresponding JavaScript type of string, number, boolean, function and object. Note
(Object value, VarScope scope)
| 1824 | * @return value suitable to pass to any API that takes JavaScript values. |
| 1825 | */ |
| 1826 | public static Object javaToJS(Object value, VarScope scope) { |
| 1827 | return javaToJS(value, scope, null); |
| 1828 | } |
| 1829 | |
| 1830 | /** |
| 1831 | * Convenient method to convert java value to its closest representation in JavaScript. |