[REM] utils: remove memoize, parseXML function

This commit is contained in:
Géry Debongnie
2019-05-10 20:46:21 +02:00
parent 53911de00a
commit dfa7d5932d
3 changed files with 10 additions and 52 deletions
+10 -1
View File
@@ -1,5 +1,4 @@
import { VNode, h } from "./vdom";
import { parseXML } from "./utils";
/**
* Owl QWeb Engine
@@ -110,6 +109,16 @@ export const UTILS = {
}
};
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;
}
//------------------------------------------------------------------------------
// Compilation Context
//------------------------------------------------------------------------------