Ejemplo n.º 1
0
static v8::Handle<v8::Value> getPresentationAttributeCallback(const v8::Arguments& args)
{
    INC_STATS("DOM.SVGFETurbulenceElement.getPresentationAttribute");
    SVGFETurbulenceElement* imp = V8SVGFETurbulenceElement::toNative(args.Holder());
    STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, name, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined));
    return toV8(imp->getPresentationAttribute(name));
}
Ejemplo n.º 2
0
JSValue* JSSVGFETurbulenceElementPrototypeFunction::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)
{
    if (!thisObj->inherits(&JSSVGFETurbulenceElement::info))
      return throwError(exec, TypeError);

    JSSVGFETurbulenceElement* castedThisObj = static_cast<JSSVGFETurbulenceElement*>(thisObj);
    SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(castedThisObj->impl());

    switch (id) {
    case JSSVGFETurbulenceElement::GetPresentationAttributeFuncNum: {
        String name = args[0]->toString(exec);


        KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name)));
        return result;
    }
    }
    return 0;
}