fix(core): update

This commit is contained in:
2022-05-28 20:03:13 +02:00
parent bda524348e
commit 58db360c79
5 changed files with 22 additions and 4 deletions

View File

@@ -10,6 +10,16 @@ export class Smartntml {
return smartntml;
}
private static smartntmlSingletonDeferred: plugins.smartpromise.Deferred<Smartntml>;
public static async createAndInitSingleton() {
if (this.smartntmlSingletonDeferred) {
return this.smartntmlSingletonDeferred.promise;
}
const smartntmlInstance = await this.createAndInit();
this.smartntmlSingletonDeferred.resolve(smartntmlInstance);
return this.smartntmlSingletonDeferred.promise;
}
// INSTANCE
render: typeof litTypes.render;
html: typeof litTypes.html;