fix(core): update

This commit is contained in:
Philipp Kunz 2022-01-07 19:47:05 +01:00
parent d2cd5ce6f3
commit 68bcc10ee6

View File

@ -13,6 +13,9 @@ export class DeesElement extends plugins.lit.LitElement {
private themeSubscription: plugins.smartrx.rxjs.Subscription;
private elementDomReadyDeferred = plugins.domtools.plugins.smartpromise.defer();
public elementDomReady = this.elementDomReadyDeferred.promise;
constructor() {
super();
this.domtoolsPromise.then((domtoolsArg) => {
@ -29,6 +32,11 @@ export class DeesElement extends plugins.lit.LitElement {
this.dispatchEvent(new CustomEvent('deesElementConnected'));
}
public firstUpdated(_changedProperties: Map<string | number | symbol, unknown>): void {
super.firstUpdated(_changedProperties);
this.elementDomReadyDeferred.resolve();
}
public async disconnectedCallback() {
await this.domtoolsPromise;
super.disconnectedCallback();