mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] compiler: generate templates in strict mode
Before this commit, generated template functions were not using strict mode. This may be a bad idea, since strict mode could be more performant in some cases.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
exports[`loading templates addTemplates does not modify its xml document in place 1`] = `
|
||||
"function anonymous(app, bdom, helpers
|
||||
) {
|
||||
\\"use strict\\";
|
||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||
|
||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||
@@ -17,6 +18,7 @@ exports[`loading templates addTemplates does not modify its xml document in plac
|
||||
exports[`loading templates can initialize qweb with a string 1`] = `
|
||||
"function anonymous(app, bdom, helpers
|
||||
) {
|
||||
\\"use strict\\";
|
||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||
|
||||
let block1 = createBlock(\`<div>jupiler</div>\`);
|
||||
@@ -30,6 +32,7 @@ exports[`loading templates can initialize qweb with a string 1`] = `
|
||||
exports[`loading templates can initialize qweb with an XMLDocument 1`] = `
|
||||
"function anonymous(app, bdom, helpers
|
||||
) {
|
||||
\\"use strict\\";
|
||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||
|
||||
let block1 = createBlock(\`<div>jupiler</div>\`);
|
||||
@@ -43,6 +46,7 @@ exports[`loading templates can initialize qweb with an XMLDocument 1`] = `
|
||||
exports[`loading templates can load a few templates from a xml string 1`] = `
|
||||
"function anonymous(app, bdom, helpers
|
||||
) {
|
||||
\\"use strict\\";
|
||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||
const callTemplate_1 = app.getTemplate(\`items\`);
|
||||
|
||||
@@ -58,6 +62,7 @@ exports[`loading templates can load a few templates from a xml string 1`] = `
|
||||
exports[`loading templates can load a few templates from a xml string 2`] = `
|
||||
"function anonymous(app, bdom, helpers
|
||||
) {
|
||||
\\"use strict\\";
|
||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||
|
||||
let block2 = createBlock(\`<li>ok</li>\`);
|
||||
@@ -74,6 +79,7 @@ exports[`loading templates can load a few templates from a xml string 2`] = `
|
||||
exports[`loading templates can load a few templates from an XMLDocument 1`] = `
|
||||
"function anonymous(app, bdom, helpers
|
||||
) {
|
||||
\\"use strict\\";
|
||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||
const callTemplate_1 = app.getTemplate(\`items\`);
|
||||
|
||||
@@ -89,6 +95,7 @@ exports[`loading templates can load a few templates from an XMLDocument 1`] = `
|
||||
exports[`loading templates can load a few templates from an XMLDocument 2`] = `
|
||||
"function anonymous(app, bdom, helpers
|
||||
) {
|
||||
\\"use strict\\";
|
||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||
|
||||
let block2 = createBlock(\`<li>ok</li>\`);
|
||||
|
||||
Reference in New Issue
Block a user