static v8::Handle<v8::Value> hasExtensionCallback(const v8::Arguments& args)
{
    INC_STATS("DOM.SVGTests.hasExtension");
    SVGTests* imp = V8SVGTests::toNative(args.Holder());
    STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, extension, args[0]);
    return v8Boolean(imp->hasExtension(extension));
}
Beispiel #2
0
JSValue* jsSVGTestsPrototypeFunctionHasExtension(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
    if (!thisValue->isObject(&JSSVGTests::s_info))
        return throwError(exec, TypeError);
    JSSVGTests* castedThisObj = static_cast<JSSVGTests*>(thisValue);
    SVGTests* imp = static_cast<SVGTests*>(castedThisObj->impl());
    const UString& extension = args.at(exec, 0)->toString(exec);


    JSC::JSValue* result = jsBoolean(imp->hasExtension(extension));
    return result;
}