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
|
||||
//------------------------------------------------------------------------------
|
||||
document.title = `${document.title} (v${owl.__info__.version})`;
|
||||
document.addEventListener("DOMContentLoaded", async function() {
|
||||
async function start() {
|
||||
document.title = `${document.title} (v${owl.__info__.version})`;
|
||||
const templates = await owl.utils.loadTemplates("templates.xml");
|
||||
const qweb = new owl.QWeb(templates);
|
||||
const env = { qweb };
|
||||
const app = new App(env);
|
||||
app.mount(document.body);
|
||||
});
|
||||
owl.utils.whenReady(() => {
|
||||
const app = new App(env);
|
||||
app.mount(document.body);
|
||||
});
|
||||
}
|
||||
|
||||
start();
|
||||
|
||||
Reference in New Issue
Block a user