JSValue* JSHTMLTextAreaElement::getValueProperty(ExecState* exec, int token) const { switch (token) { case DefaultValueAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsString(exec, imp->defaultValue()); } case FormAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return toJS(exec, WTF::getPtr(imp->form())); } case AccessKeyAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsString(exec, imp->accessKey()); } case ColsAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsNumber(exec, imp->cols()); } case DisabledAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsBoolean(imp->disabled()); } case AutofocusAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsBoolean(imp->autofocus()); } case NameAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsString(exec, imp->name()); } case ReadOnlyAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsBoolean(imp->readOnly()); } case RowsAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsNumber(exec, imp->rows()); } case TypeAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsString(exec, imp->type()); } case ValueAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsString(exec, imp->value()); } case SelectionStartAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsNumber(exec, imp->selectionStart()); } case SelectionEndAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsNumber(exec, imp->selectionEnd()); } case ConstructorAttrNum: return getConstructor(exec); } return 0; }
static v8::Handle<v8::Value> typeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.HTMLTextAreaElement.type._get"); HTMLTextAreaElement* imp = V8HTMLTextAreaElement::toNative(info.Holder()); return v8String(imp->type()); }
JSValue jsHTMLTextAreaElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { UNUSED_PARAM(exec); HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl()); return jsString(exec, imp->type()); }