* Set prototype and parent scope, although we'd have to return NOT_FOUND
in get() in order to get the prototype chain working.
This commit is contained in:
parent
504e5dba18
commit
c070627d99
1 changed files with 4 additions and 2 deletions
|
@ -43,12 +43,14 @@ public class MapWrapper extends ScriptableObject implements Wrapper {
|
||||||
/**
|
/**
|
||||||
* Creates a new MapWrapper object.
|
* Creates a new MapWrapper object.
|
||||||
*
|
*
|
||||||
* @param map ...
|
* @param map the Map
|
||||||
* @param core ...
|
* @param core the RhinoCore instance
|
||||||
*/
|
*/
|
||||||
public MapWrapper(Map map, RhinoCore core) {
|
public MapWrapper(Map map, RhinoCore core) {
|
||||||
this.map = map;
|
this.map = map;
|
||||||
this.core = core;
|
this.core = core;
|
||||||
|
setParentScope(core.global);
|
||||||
|
setPrototype(ScriptableObject.getObjectPrototype(core.global));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue