static v8::Handle<v8::Value> setSelectionRangeCallback(const v8::Arguments& args) { INC_STATS("DOM.HTMLTextAreaElement.setSelectionRange"); HTMLTextAreaElement* imp = V8HTMLTextAreaElement::toNative(args.Holder()); EXCEPTION_BLOCK(int, start, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))); EXCEPTION_BLOCK(int, end, toInt32(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefined))); if (args.Length() <= 2) { imp->setSelectionRange(start, end); return v8::Handle<v8::Value>(); } STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, direction, MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefined)); imp->setSelectionRange(start, end, direction); return v8::Handle<v8::Value>(); }
JSValue* jsHTMLTextAreaElementPrototypeFunctionSetSelectionRange(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args) { if (!thisValue->isObject(&JSHTMLTextAreaElement::s_info)) return throwError(exec, TypeError); JSHTMLTextAreaElement* castedThisObj = static_cast<JSHTMLTextAreaElement*>(thisValue); HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(castedThisObj->impl()); int start = args[0]->toInt32(exec); int end = args[1]->toInt32(exec); imp->setSelectionRange(start, end); return jsUndefined(); }
JSValue JSC_HOST_CALL jsHTMLTextAreaElementPrototypeFunctionSetSelectionRange(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); if (!thisValue.isObject(&JSHTMLTextAreaElement::s_info)) return throwError(exec, TypeError); JSHTMLTextAreaElement* castedThisObj = static_cast<JSHTMLTextAreaElement*>(asObject(thisValue)); HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(castedThisObj->impl()); int start = args.at(0).toInt32(exec); int end = args.at(1).toInt32(exec); imp->setSelectionRange(start, end); return jsUndefined(); }