static void baseValAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) { SVGAnimatedString* imp = V8SVGAnimatedString::toNative(info.Holder()); V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); ExceptionCode ec = 0; imp->setBaseVal(v, ec); if (UNLIKELY(ec)) setDOMException(ec, info.GetIsolate()); return; }
void JSSVGAnimatedString::putValueProperty(ExecState* exec, int token, JSValue* value) { switch (token) { case BaseValAttrNum: { SVGAnimatedString* imp = static_cast<SVGAnimatedString*>(impl()); imp->setBaseVal(value->toString(exec)); if (context()) context()->svgAttributeChanged(impl()->associatedAttributeName()); break; } } }
JSValue* JSSVGAnimatedString::getValueProperty(ExecState* exec, int token) const { switch (token) { case BaseValAttrNum: { SVGAnimatedString* imp = static_cast<SVGAnimatedString*>(impl()); return jsString(exec, imp->baseVal()); } case AnimValAttrNum: { SVGAnimatedString* imp = static_cast<SVGAnimatedString*>(impl()); return jsString(exec, imp->animVal()); } } return 0; }
static v8::Handle<v8::Value> animValAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { SVGAnimatedString* imp = V8SVGAnimatedString::toNative(info.Holder()); return v8String(imp->animVal(), info.GetIsolate()); }