JSValue* JSHTMLPreElement::getValueProperty(ExecState* exec, int token) const { switch (token) { case WidthAttrNum: { HTMLPreElement* imp = static_cast<HTMLPreElement*>(impl()); return jsNumber(exec, imp->width()); } case WrapAttrNum: { HTMLPreElement* imp = static_cast<HTMLPreElement*>(impl()); return jsBoolean(imp->wrap()); } case ConstructorAttrNum: return getConstructor(exec); } return 0; }
static v8::Handle<v8::Value> widthAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.HTMLPreElement.width._get"); HTMLPreElement* imp = V8HTMLPreElement::toNative(info.Holder()); return v8::Integer::New(imp->width()); }