Performance hacks

This commit is contained in:
Pieter Vander Vennet 2022-01-06 18:51:52 +01:00
parent 686fb29ed3
commit 7090a5ceb8
15 changed files with 167 additions and 93 deletions

View file

@ -11,6 +11,7 @@ export default abstract class BaseUIElement {
private clss: Set<string> = new Set<string>();
private style: string;
private _onClick: () => void;
protected isDestroyed = false;
public onClick(f: (() => void)) {
this._onClick = f;
@ -149,6 +150,10 @@ export default abstract class BaseUIElement {
public AsMarkdown(): string {
throw "AsMarkdown is not implemented by " + this.constructor.name+"; implement it in the subclass"
}
public Destroy(){
this.isDestroyed = true;
}
protected abstract InnerConstructElement(): HTMLElement;
}