Exemplo n.º 1
0
JSValue* jsSVGSwitchElementPrototypeFunctionHasExtension(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
    if (!thisValue->isObject(&JSSVGSwitchElement::s_info))
        return throwError(exec, TypeError);
    JSSVGSwitchElement* castedThisObj = static_cast<JSSVGSwitchElement*>(thisValue);
    SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(castedThisObj->impl());
    const UString& extension = args.at(exec, 0)->toString(exec);


    JSC::JSValue* result = jsBoolean(imp->hasExtension(extension));
    return result;
}
JSValue JSC_HOST_CALL jsSVGSwitchElementPrototypeFunctionHasExtension(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
    UNUSED_PARAM(args);
    if (!thisValue.inherits(&JSSVGSwitchElement::s_info))
        return throwError(exec, TypeError);
    JSSVGSwitchElement* castedThisObj = static_cast<JSSVGSwitchElement*>(asObject(thisValue));
    SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(castedThisObj->impl());
    const UString& extension = args.at(0).toString(exec);


    JSC::JSValue result = jsBoolean(imp->hasExtension(extension));
    return result;
}
static v8::Handle<v8::Value> hasExtensionCallback(const v8::Arguments& args)
{
    SVGSwitchElement* imp = V8SVGSwitchElement::toNative(args.Holder());
    V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, extension, MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined));
    return v8Boolean(imp->hasExtension(extension), args.GetIsolate());
}