Esempio n. 1
0
void V8XSLTProcessor::getParameterMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
    if (isUndefinedOrNull(info[1]))
        return;

    TOSTRING_VOID(V8StringResource<>, namespaceURI, info[0]);
    TOSTRING_VOID(V8StringResource<>, localName, info[1]);

    XSLTProcessor* impl = V8XSLTProcessor::toNative(info.Holder());
    String result = impl->getParameter(namespaceURI, localName);
    if (result.isNull())
        return;

    v8SetReturnValueString(info, result, info.GetIsolate());
}
v8::Handle<v8::Value> V8XSLTProcessor::getParameterMethodCustom(const v8::Arguments& args)
{
    if (isUndefinedOrNull(args[1]))
        return v8::Undefined();

    XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());

    String namespaceURI = toWebCoreString(args[0]);
    String localName = toWebCoreString(args[1]);
    String result = imp->getParameter(namespaceURI, localName);
    if (result.isNull())
        return v8::Undefined();

    return v8String(result, args.GetIsolate());
}
void V8XSLTProcessor::getParameterMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
{
    if (isUndefinedOrNull(args[1]))
        return;

    XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());

    String namespaceURI = toWebCoreString(args[0]);
    String localName = toWebCoreString(args[1]);
    String result = imp->getParameter(namespaceURI, localName);
    if (result.isNull())
        return;

    v8SetReturnValueString(args, result, args.GetIsolate());
}
v8::Handle<v8::Value> V8XSLTProcessor::getParameterCallback(const v8::Arguments& args)
{
    INC_STATS("DOM.XSLTProcessor.getParameter");
    if (isUndefinedOrNull(args[1]))
        return v8::Undefined();

    XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());

    String namespaceURI = toWebCoreString(args[0]);
    String localName = toWebCoreString(args[1]);
    String result = imp->getParameter(namespaceURI, localName);
    if (result.isNull())
        return v8::Undefined();

    return v8String(result);
}