Implemented error signal in XML formatter
This commit is contained in:
@@ -16,8 +16,13 @@ const props = defineProps(
|
||||
}
|
||||
)
|
||||
|
||||
const emit = defineEmits([
|
||||
'update:result',
|
||||
'update:error'
|
||||
])
|
||||
|
||||
function chooseType(formatType: String){
|
||||
if (formatType == "XML Converter"){
|
||||
if (formatType == "HTML -> XML"){
|
||||
return "convert";
|
||||
}
|
||||
return formatType.toLowerCase();
|
||||
@@ -42,11 +47,6 @@ function createBody(){
|
||||
|
||||
const fetchLink = document.location.protocol + "//" + document.location.hostname + "/libxml/html/" + chooseType(props.formatType);
|
||||
|
||||
const emit = defineEmits([
|
||||
'update:result',
|
||||
'update:error'
|
||||
])
|
||||
|
||||
function processResponse(formattedCode : any){
|
||||
var result = formattedCode.result;
|
||||
emit("update:error", formattedCode.status == "ERR")
|
||||
|
||||
Reference in New Issue
Block a user