Exemplo n.º 1
0
  private Object applyOrCall(
      boolean isApply, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) {
    String methodName = isApply ? "apply" : "call";
    if (!(thisObj instanceof XMLList) || ((XMLList) thisObj).targetProperty == null)
      throw ScriptRuntime.typeError1("msg.isnt.function", methodName);

    return ScriptRuntime.applyOrCall(isApply, cx, scope, thisObj, args);
  }