MCPcopy Create free account
hub / github.com/mozilla/rhino / javaToJS

Method javaToJS

rhino/src/main/java/org/mozilla/javascript/Context.java:1826–1828  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 15

putMethod · 0.95
invokeMethodRawMethod · 0.95
setUpMethod · 0.95
runScriptMethod · 0.95
joMethod · 0.95
jaMethod · 0.95
javaToJSONMethod · 0.95
newCatchScopeMethod · 0.95
runScriptMethod · 0.95

Calls 4

getContextMethod · 0.95
getWrapFactoryMethod · 0.80
valueOfMethod · 0.45
wrapMethod · 0.45

Tested by 10

setUpMethod · 0.76
runScriptMethod · 0.76
runScriptMethod · 0.76
executeScriptMethod · 0.76
initContextMethod · 0.76
runScriptMethod · 0.76
runScriptES6Method · 0.76