JSValue* JSSVGFEImageElementPrototypeFunction::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args) { if (!thisObj->inherits(&JSSVGFEImageElement::info)) return throwError(exec, TypeError); JSSVGFEImageElement* castedThisObj = static_cast<JSSVGFEImageElement*>(thisObj); SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThisObj->impl()); switch (id) { case JSSVGFEImageElement::GetPresentationAttributeFuncNum: { String name = args[0]->toString(exec); KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); return result; } } return 0; }
static v8::Handle<v8::Value> getPresentationAttributeCallback(const v8::Arguments& args) { SVGFEImageElement* imp = V8SVGFEImageElement::toNative(args.Holder()); V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, name, MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined)); return toV8Fast(imp->getPresentationAttribute(name), args, imp); }