Return a native JavaScript array in HopObject.list() rather than a wrapped Java array.

This commit is contained in:
hns 2003-09-02 16:55:24 +00:00
parent 75c7dff23b
commit e3dfc52191

View file

@ -341,7 +341,7 @@ public class HopObject extends ScriptableObject implements Wrapper {
* *
* @return ... * @return ...
*/ */
public Object[] jsFunction_list() { public NativeArray jsFunction_list() {
Enumeration e = node.getSubnodes(); Enumeration e = node.getSubnodes();
ArrayList a = new ArrayList(); ArrayList a = new ArrayList();
@ -349,7 +349,7 @@ public class HopObject extends ScriptableObject implements Wrapper {
a.add(e.nextElement()); a.add(e.nextElement());
} }
return a.toArray(); return new NativeArray(a.toArray());
} }
/** /**