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
|
||||
//------------------------------------------------------------------------------
|
||||
class QWeb {
|
||||
constructor() {
|
||||
constructor(data) {
|
||||
this.processedTemplates = {};
|
||||
this.templates = {};
|
||||
this.directives = [];
|
||||
@@ -1346,6 +1346,9 @@
|
||||
refDirective,
|
||||
widgetDirective
|
||||
].forEach(d => this.addDirective(d));
|
||||
if (data) {
|
||||
this.loadTemplates(data);
|
||||
}
|
||||
}
|
||||
addDirective(dir) {
|
||||
this.directives.push(dir);
|
||||
@@ -2117,7 +2120,7 @@
|
||||
exports.extras = extras;
|
||||
|
||||
exports._version = '0.4.0';
|
||||
exports._date = '2019-03-29T14:38:00.073Z';
|
||||
exports._hash = 'e6b0d06';
|
||||
exports._date = '2019-03-29T15:41:21.984Z';
|
||||
exports._hash = 'd6e61c2';
|
||||
|
||||
}(this.owl = this.owl || {}));
|
||||
|
||||
+3
-3
@@ -168,9 +168,9 @@ class App extends owl.core.Component {
|
||||
//------------------------------------------------------------------------------
|
||||
// Application initialization
|
||||
//------------------------------------------------------------------------------
|
||||
const qweb = new owl.core.QWeb();
|
||||
qweb.loadTemplates(TEMPLATES);
|
||||
const env = {qweb};
|
||||
const env = {
|
||||
qweb: new owl.core.QWeb(TEMPLATES)
|
||||
};
|
||||
|
||||
const app = new App(env);
|
||||
app.mount(document.body);
|
||||
|
||||
Reference in New Issue
Block a user