ref: rename _start to _prepare

This commit is contained in:
Géry Debongnie
2019-04-10 10:45:27 +02:00
parent f960149ba2
commit 90f6808f57
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -220,7 +220,7 @@ export class Component<
}
async mount(target: HTMLElement): Promise<void> {
const vnode = await this._start();
const vnode = await this._prepare();
if (this.__widget__.isDestroyed) {
// widget was destroyed before we get here...
return;
@@ -367,7 +367,7 @@ export class Component<
this.__widget__.vnode = patch(document.createElement(vnode.sel!), vnode);
}
}
async _start(): Promise<VNode> {
async _prepare(): Promise<VNode> {
this.__widget__.renderProps = this.props;
this.__widget__.renderPromise = this.willStart().then(() => {
if (this.__widget__.isDestroyed) {
+1 -1
View File
@@ -1001,7 +1001,7 @@ const widgetDirective: Directive = {
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();