mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
imp: improve benchmark code
This commit is contained in:
+6
-3
@@ -1312,7 +1312,7 @@
|
|||||||
// QWeb rendering engine
|
// QWeb rendering engine
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
class QWeb {
|
class QWeb {
|
||||||
constructor() {
|
constructor(data) {
|
||||||
this.processedTemplates = {};
|
this.processedTemplates = {};
|
||||||
this.templates = {};
|
this.templates = {};
|
||||||
this.directives = [];
|
this.directives = [];
|
||||||
@@ -1346,6 +1346,9 @@
|
|||||||
refDirective,
|
refDirective,
|
||||||
widgetDirective
|
widgetDirective
|
||||||
].forEach(d => this.addDirective(d));
|
].forEach(d => this.addDirective(d));
|
||||||
|
if (data) {
|
||||||
|
this.loadTemplates(data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
addDirective(dir) {
|
addDirective(dir) {
|
||||||
this.directives.push(dir);
|
this.directives.push(dir);
|
||||||
@@ -2117,7 +2120,7 @@
|
|||||||
exports.extras = extras;
|
exports.extras = extras;
|
||||||
|
|
||||||
exports._version = '0.4.0';
|
exports._version = '0.4.0';
|
||||||
exports._date = '2019-03-29T14:38:00.073Z';
|
exports._date = '2019-03-29T15:41:21.984Z';
|
||||||
exports._hash = 'e6b0d06';
|
exports._hash = 'd6e61c2';
|
||||||
|
|
||||||
}(this.owl = this.owl || {}));
|
}(this.owl = this.owl || {}));
|
||||||
|
|||||||
+3
-3
@@ -168,9 +168,9 @@ class App extends owl.core.Component {
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Application initialization
|
// Application initialization
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
const qweb = new owl.core.QWeb();
|
const env = {
|
||||||
qweb.loadTemplates(TEMPLATES);
|
qweb: new owl.core.QWeb(TEMPLATES)
|
||||||
const env = {qweb};
|
};
|
||||||
|
|
||||||
const app = new App(env);
|
const app = new App(env);
|
||||||
app.mount(document.body);
|
app.mount(document.body);
|
||||||
|
|||||||
Reference in New Issue
Block a user