mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REF] extras: start loading templates earlier
This commit is contained in:
@@ -352,11 +352,15 @@ class TabbedEditor extends owl.Component {
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Application initialization
|
// Application initialization
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
document.title = `${document.title} (v${owl.__info__.version})`;
|
async function start() {
|
||||||
document.addEventListener("DOMContentLoaded", async function() {
|
document.title = `${document.title} (v${owl.__info__.version})`;
|
||||||
const templates = await owl.utils.loadTemplates("templates.xml");
|
const templates = await owl.utils.loadTemplates("templates.xml");
|
||||||
const qweb = new owl.QWeb(templates);
|
const qweb = new owl.QWeb(templates);
|
||||||
const env = { qweb };
|
const env = { qweb };
|
||||||
const app = new App(env);
|
owl.utils.whenReady(() => {
|
||||||
app.mount(document.body);
|
const app = new App(env);
|
||||||
});
|
app.mount(document.body);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
start();
|
||||||
|
|||||||
Reference in New Issue
Block a user