[FIX] playground: update example to owl 2

This commit is contained in:
Géry Debongnie
2021-12-21 15:09:02 +01:00
committed by Aaron Bohy
parent ce8ddd1cbf
commit 38941bc26f
3 changed files with 458 additions and 541 deletions
+2 -11
View File
@@ -39,18 +39,9 @@ function makeCodeIframe(js, css, xml) {
const script = doc.createElement("script");
script.type = "module";
const content = `
import * as utils from "./utils.js";
(function (owl) {
const _configure = owl.App.prototype.configure;
owl.App.prototype.configure = function configureOverriden(config) {
config = Object.assign({ dev: true }, config);
this.addTemplates(\`${sanitizedXML}\`);
return _configure.call(this, config);
}
})(owl);
(async function() {
(async function(TEMPLATES) {
${js}
})()`;
})(\`${sanitizedXML}\`)`;
script.innerHTML = content;
doc.body.appendChild(script);
});
File diff suppressed because it is too large Load Diff