JSXSLTProcessorCustom.cpp [plain text]
#include "config.h"
#if ENABLE(XSLT)
#include "JSXSLTProcessor.h"
#include "Document.h"
#include "DocumentFragment.h"
#include "JSDocument.h"
#include "JSDocumentFragment.h"
#include "JSNode.h"
#include "Node.h"
#include "XSLTProcessor.h"
#include "JSDOMBinding.h"
#include <wtf/text/WTFString.h>
using namespace JSC;
namespace WebCore {
JSValue JSXSLTProcessor::setParameter(ExecState& state)
{
if (state.argument(1).isUndefinedOrNull() || state.argument(2).isUndefinedOrNull())
return jsUndefined(); String namespaceURI = state.uncheckedArgument(0).toWTFString(&state);
String localName = state.uncheckedArgument(1).toWTFString(&state);
String value = state.uncheckedArgument(2).toWTFString(&state);
wrapped().setParameter(namespaceURI, localName, value);
return jsUndefined();
}
JSValue JSXSLTProcessor::getParameter(ExecState& state)
{
if (state.argument(1).isUndefinedOrNull())
return jsUndefined();
String namespaceURI = state.uncheckedArgument(0).toWTFString(&state);
String localName = state.uncheckedArgument(1).toWTFString(&state);
String value = wrapped().getParameter(namespaceURI, localName);
return jsStringOrUndefined(&state, value);
}
JSValue JSXSLTProcessor::removeParameter(ExecState& state)
{
if (state.argument(1).isUndefinedOrNull())
return jsUndefined();
String namespaceURI = state.uncheckedArgument(0).toWTFString(&state);
String localName = state.uncheckedArgument(1).toWTFString(&state);
wrapped().removeParameter(namespaceURI, localName);
return jsUndefined();
}
}
#endif // ENABLE(XSLT)