gecko-dev/js/js2/java/NativeFunction.java
1999-06-11 00:21:26 +00:00

20 lines
368 B
Java

class NativeFunction extends JSObject {
NativeFunction(ControlNode aBody)
{
super("Function");
body = aBody;
}
JSValue call(Environment theEnv, JSValue rV)
{
ControlNode c = body;
while (c != null) c = c.eval(theEnv);
return theEnv.resultValue;
}
ControlNode body;
}