JSValue* JSHTMLInputElementPrototypeFunction::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args) { if (!thisObj->inherits(&JSHTMLInputElement::info)) return throwError(exec, TypeError); HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(thisObj)->impl()); switch (id) { case JSHTMLInputElement::BlurFuncNum: { imp->blur(); return jsUndefined(); } case JSHTMLInputElement::FocusFuncNum: { imp->focus(); return jsUndefined(); } case JSHTMLInputElement::SelectFuncNum: { imp->select(); return jsUndefined(); } case JSHTMLInputElement::ClickFuncNum: { imp->click(); return jsUndefined(); } } return 0; }