mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REM] utils: remove memoize, parseXML function
This commit is contained in:
+10
-1
@@ -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
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user