fix(core): update
This commit is contained in:
		| @@ -3,6 +3,6 @@ | ||||
|  */ | ||||
| export const commitinfo = { | ||||
|   name: '@design.estate/dees-element', | ||||
|   version: '2.0.31', | ||||
|   version: '2.0.32', | ||||
|   description: 'a custom element class extending lit element class' | ||||
| } | ||||
|   | ||||
| @@ -40,12 +40,20 @@ export class DeesElement extends plugins.lit.LitElement { | ||||
|     this.elementDomReadyDeferred.resolve(); | ||||
|   } | ||||
|  | ||||
|   private garbageFunctions: (() => void)[] = []; | ||||
|   public registerGarbageFunction(garbageFunctionArg: () => void) { | ||||
|     this.garbageFunctions.push(garbageFunctionArg); | ||||
|   } | ||||
|  | ||||
|   public async disconnectedCallback() { | ||||
|     await this.domtoolsPromise; | ||||
|     super.disconnectedCallback(); | ||||
|     for (const subscription of this.rxSubscriptions) { | ||||
|       subscription.unsubscribe(); | ||||
|     } | ||||
|     for (const garbageFunction of this.garbageFunctions) { | ||||
|       garbageFunction(); | ||||
|     } | ||||
|     this.dispatchEvent(new CustomEvent('deesElementDisconnected')); | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user