Replies: 1 comment
-
Every object is technically a java class. If the class implements the Context does not implement Scriptable, but the return value of initStandardObjects does. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For some time now, I have been dealing with the question why Rhino returns a JavaScript object for certain Java classes.
Here an example:
The first sequence delivers with the variable cx a Java object.
The second sequence delivers with the variable sealedSharedScope a JavaScript object.
But I expect in the second sequence a Java class org.mozilla.javascript.Context.
What is the reason that a JavaScript object is returned instead of a Java class?
How can I get a Java class, so that I can use its methods and attributes in the following code?
Beta Was this translation helpful? Give feedback.
All reactions