Override wrapAsJavaObject in wrapper factory to check for IPathElement objects.
This commit is contained in:
parent
3c1c5b47b8
commit
ec1aed6650
1 changed files with 6 additions and 3 deletions
|
@ -749,10 +749,13 @@ public final class RhinoCore {
|
|||
return super.wrap(cx, scope, obj, staticType);
|
||||
}
|
||||
|
||||
/* public Scriptable wrapAsJavaObject(Context cx, Scriptable scope, Object javaObject) {
|
||||
System.err.println ("J-Wrapping: "+javaObject);
|
||||
public Scriptable wrapAsJavaObject(Context cx, Scriptable scope, Object javaObject) {
|
||||
if (javaObject instanceof IPathElement) {
|
||||
return getElementWrapper(javaObject);
|
||||
}
|
||||
|
||||
return super.wrapAsJavaObject(cx, scope, javaObject);
|
||||
} */
|
||||
}
|
||||
|
||||
public Scriptable wrapNewObject(Context cx, Scriptable scope, Object obj) {
|
||||
// System.err.println ("N-Wrapping: "+obj);
|
||||
|
|
Loading…
Add table
Reference in a new issue