[REF] qweb: split code into 3 files

closes #84
This commit is contained in:
Géry Debongnie
2019-05-06 12:34:36 +02:00
parent b9591cfecd
commit bd29e4f761
9 changed files with 1314 additions and 1276 deletions
+9
View File
@@ -156,3 +156,12 @@ export function whenReady(fn) {
document.addEventListener("DOMContentLoaded", fn, false);
}
}
export function parseXML(xml: string): Document {
const parser = new DOMParser();
const doc = parser.parseFromString(xml, "text/xml");
if (doc.getElementsByTagName("parsererror").length) {
throw new Error("Invalid XML in template");
}
return doc;
}