- public Object call(Object method, JSArray args) throws JS.Exn {
- if (!"indexof".equals(method)) return null;
- Box b = (Box)args.elementAt(0);
- if (b.parent != this) return (redirect == null || redirect == this) ? N(-1) : redirect.call(method, args);
+ public Object callMethod(Object method, Object a0, Object a1, Object a2, Object[] rest, int nargs) throws JS.Exn {
+ if (nargs != 1 || !"indexof".equals(method)) return super.callMethod(method, a0, a1, a2, rest, nargs);
+ Box b = (Box)a0;
+ if (b.parent != this)
+ return (redirect == null || redirect == this) ?
+ N(-1) :
+ redirect.callMethod(method, a0, a1, a2, rest, nargs);