added base element

This commit is contained in:
David Meincke
2022-03-21 12:07:28 +01:00
parent f7fa60ea15
commit b2e183e93f
7 changed files with 78 additions and 4 deletions
+18
View File
@@ -0,0 +1,18 @@
export class BaseElement extends HTMLElement {
private _hasConnectedCallback: boolean = false;
connectedCallback() {
if (!this._hasConnectedCallback) {
this.onInit();
}
else {
this.onUpdate();
}
this._hasConnectedCallback = true;
}
onInit() { }
onUpdate() { }
}