code: public int indexOf(Object obj) {
          if (obj instanceof JavascriptObject) {
              return checkInteger(invokeJavascript("indexOf", ((JavascriptObject) obj).getJSObject()), -1);
          }
          return checkInteger(invokeJavascript("indexOf", obj), -1);
      }
docs: indexOf() 	Search the array for an element and returns its position