mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] playground: update example to owl 2
This commit is contained in:
committed by
Aaron Bohy
parent
ce8ddd1cbf
commit
38941bc26f
@@ -16,8 +16,6 @@ import { mainEventHandler } from "./component/handler";
|
|||||||
import { Portal } from "./portal";
|
import { Portal } from "./portal";
|
||||||
export type { Reactive } from "./reactivity";
|
export type { Reactive } from "./reactivity";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
config.shouldNormalizeDom = false;
|
config.shouldNormalizeDom = false;
|
||||||
config.mainEventHandler = mainEventHandler;
|
config.mainEventHandler = mainEventHandler;
|
||||||
(UTILS as any).Portal = Portal;
|
(UTILS as any).Portal = Portal;
|
||||||
|
|||||||
+2
-11
@@ -39,18 +39,9 @@ function makeCodeIframe(js, css, xml) {
|
|||||||
const script = doc.createElement("script");
|
const script = doc.createElement("script");
|
||||||
script.type = "module";
|
script.type = "module";
|
||||||
const content = `
|
const content = `
|
||||||
import * as utils from "./utils.js";
|
(async function(TEMPLATES) {
|
||||||
(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() {
|
|
||||||
${js}
|
${js}
|
||||||
})()`;
|
})(\`${sanitizedXML}\`)`;
|
||||||
script.innerHTML = content;
|
script.innerHTML = content;
|
||||||
doc.body.appendChild(script);
|
doc.body.appendChild(script);
|
||||||
});
|
});
|
||||||
|
|||||||
+453
-525
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user