mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REF] code_generator: move generating code to CodeTarget
Before this commit, we had two places with code that generate a function code. Now, all this code is moved in a method 'generateCode' on CodeTarget.
This commit is contained in:
committed by
Samuel Degueldre
parent
a1d435c5a5
commit
5b0dce94cf
@@ -18,7 +18,7 @@ exports[`Memo if no prop change, prevent renderings from above 2`] = `
|
||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
||||
|
||||
function slot1(ctx, node, key) {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let b6 = text(ctx['state'].a);
|
||||
let b7 = text(ctx['state'].b);
|
||||
let b8 = text(ctx['state'].c);
|
||||
@@ -53,7 +53,7 @@ exports[`Memo if no props, prevent renderings from above 2`] = `
|
||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
||||
|
||||
function slot2(ctx, node, key) {
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
return component(\`Child\`, {value: ctx['state'].value}, key + \`__3\`, node, ctx);
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ exports[`Memo if no props, prevent renderings from above (work with simple html)
|
||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
||||
|
||||
function slot1(ctx, node, key) {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return text(ctx['state'].value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user