-
Bug
-
Resolution: Fixed
-
P3
-
None
-
None
-
b96
-
generic
-
generic
-
Verified
loadWithNewGlobal function as well as evaluating script using ScriptEngine's eval methods return ScriptObject instances as ScriptObjectMirror instances. Right now, property and method call access on ScriptObjectMirror objects are supported by JSObjectLinker. This provides natural syntax to access "foreign"/"mirror" objects from scripts. Also delete is supported. But we need bit more support for nodejar:
* support for instanceof operator b/w mirror objects
* support for array-like mirror objects. For eg. Array.prototype generic functions could work well on array-like mirror objects. Function.apply could accept array-like mirror object for arguments.
* passing current global's functions as callbacks to mirror Array.prototype functions
* Support JS Object "static" methods such as Object.keys etc. on mirrors.
Please note that it is not possible/desirable to support all JS APIs on mirror objects. But a useful subset of Array.prototype and Object functions would be very useful.
* support for instanceof operator b/w mirror objects
* support for array-like mirror objects. For eg. Array.prototype generic functions could work well on array-like mirror objects. Function.apply could accept array-like mirror object for arguments.
* passing current global's functions as callbacks to mirror Array.prototype functions
* Support JS Object "static" methods such as Object.keys etc. on mirrors.
Please note that it is not possible/desirable to support all JS APIs on mirror objects. But a useful subset of Array.prototype and Object functions would be very useful.