Refactor javascript

move repeating javascript code to scripts.js file
This commit is contained in:
2023-03-22 14:22:09 +01:00
parent cfe5eb3b88
commit 52ca53adb6
6 changed files with 231 additions and 227 deletions

View File

@@ -20,6 +20,34 @@ function clearDefaultContent(element, text) {
}
}
/**
* It returns the value of the element with id "processors".
*
* @function
* @name getProcessor
* @kind function
* @returns {any}
*/
function getProcessor() {
return document.getElementById("processors").value;
}
/**
* It returns version of XSLT.
*
* @function
* @name getVersion
* @kind function
* @returns {"1.0" | "3.0"}
*/
function getVersion() {
if (getProcessor() == "xalan") {
return "1.0";
} else {
return "3.0";
}
}
/**
* It clears all data fields.
*