mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
ref: rename _start to _prepare
This commit is contained in:
+2
-2
@@ -220,7 +220,7 @@ export class Component<
|
|||||||
}
|
}
|
||||||
|
|
||||||
async mount(target: HTMLElement): Promise<void> {
|
async mount(target: HTMLElement): Promise<void> {
|
||||||
const vnode = await this._start();
|
const vnode = await this._prepare();
|
||||||
if (this.__widget__.isDestroyed) {
|
if (this.__widget__.isDestroyed) {
|
||||||
// widget was destroyed before we get here...
|
// widget was destroyed before we get here...
|
||||||
return;
|
return;
|
||||||
@@ -367,7 +367,7 @@ export class Component<
|
|||||||
this.__widget__.vnode = patch(document.createElement(vnode.sel!), vnode);
|
this.__widget__.vnode = patch(document.createElement(vnode.sel!), vnode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async _start(): Promise<VNode> {
|
async _prepare(): Promise<VNode> {
|
||||||
this.__widget__.renderProps = this.props;
|
this.__widget__.renderProps = this.props;
|
||||||
this.__widget__.renderPromise = this.willStart().then(() => {
|
this.__widget__.renderPromise = this.willStart().then(() => {
|
||||||
if (this.__widget__.isDestroyed) {
|
if (this.__widget__.isDestroyed) {
|
||||||
|
|||||||
+1
-1
@@ -1001,7 +1001,7 @@ const widgetDirective: Directive = {
|
|||||||
ctx.addLine(`context.refs[${ctx.formatExpression(ref)}] = w${widgetID};`);
|
ctx.addLine(`context.refs[${ctx.formatExpression(ref)}] = w${widgetID};`);
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.addLine(`def${defID} = w${widgetID}._start();`);
|
ctx.addLine(`def${defID} = w${widgetID}._prepare();`);
|
||||||
ctx.closeIf();
|
ctx.closeIf();
|
||||||
ctx.closeIf();
|
ctx.closeIf();
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ exports[`composition sub widgets with some state rendered in a loop 1`] = `
|
|||||||
} else {
|
} else {
|
||||||
w7 = new context.widgets['ChildWidget'](owner, props7);
|
w7 = new context.widgets['ChildWidget'](owner, props7);
|
||||||
context.__widget__.cmap[key8] = w7.__widget__.id;
|
context.__widget__.cmap[key8] = w7.__widget__.id;
|
||||||
def6 = w7._start();
|
def6 = w7._prepare();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isNew7) {
|
if (isNew7) {
|
||||||
@@ -95,7 +95,7 @@ exports[`random stuff/miscellaneous snapshotting compiled code 1`] = `
|
|||||||
} else {
|
} else {
|
||||||
w4 = new context.widgets['child'](owner, props4);
|
w4 = new context.widgets['child'](owner, props4);
|
||||||
context.__widget__.cmap[key5] = w4.__widget__.id;
|
context.__widget__.cmap[key5] = w4.__widget__.id;
|
||||||
def3 = w4._start();
|
def3 = w4._prepare();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isNew4) {
|
if (isNew4) {
|
||||||
@@ -141,7 +141,7 @@ exports[`random stuff/miscellaneous t-props should not be undefined (snapshottin
|
|||||||
} else {
|
} else {
|
||||||
w4 = new context.widgets['child'](owner, props4);
|
w4 = new context.widgets['child'](owner, props4);
|
||||||
context.__widget__.cmap[4] = w4.__widget__.id;
|
context.__widget__.cmap[4] = w4.__widget__.id;
|
||||||
def3 = w4._start();
|
def3 = w4._prepare();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isNew4) {
|
if (isNew4) {
|
||||||
|
|||||||
Reference in New Issue
Block a user