files/en-us/web/api/xsltprocessor/getparameter/index.md
{{APIRef("DOM")}}
The getParameter() method of the {{domxref("XSLTProcessor")}} interface returns the value of a parameter (<xsl:param>) from the stylesheet imported in the processor.
getParameter(namespaceURI, localName)
namespaceURI
"").localName
An object that is the value associated with the parameter. It can be of any type.
[!NOTE] Firefox supports any kind of parameter. Chrome, Edge and Safari only support string parameters.
This example shows how to use getParameter() to check the value of a parameter that controls the behavior of an XSLT transformation.
const xsltProcessor = new XSLTProcessor();
xsltProcessor.setParameter(null, "foo", "bar");
console.log(xsltProcessor.getParameter(null, "foo")); // "bar"
{{Specifications}}
{{Compat}}