Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
a8e7d2f335 | |||
219390e895 | |||
e321286259 | |||
5f141feb50 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@design.estate/dees-element",
|
"name": "@design.estate/dees-element",
|
||||||
"version": "2.0.30",
|
"version": "2.0.32",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "a custom element class extending lit element class",
|
"description": "a custom element class extending lit element class",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@design.estate/dees-element',
|
name: '@design.estate/dees-element',
|
||||||
version: '2.0.30',
|
version: '2.0.32',
|
||||||
description: 'a custom element class extending lit element class'
|
description: 'a custom element class extending lit element class'
|
||||||
}
|
}
|
||||||
|
@ -40,12 +40,20 @@ export class DeesElement extends plugins.lit.LitElement {
|
|||||||
this.elementDomReadyDeferred.resolve();
|
this.elementDomReadyDeferred.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private garbageFunctions: (() => void)[] = [];
|
||||||
|
public registerGarbageFunction(garbageFunctionArg: () => void) {
|
||||||
|
this.garbageFunctions.push(garbageFunctionArg);
|
||||||
|
}
|
||||||
|
|
||||||
public async disconnectedCallback() {
|
public async disconnectedCallback() {
|
||||||
await this.domtoolsPromise;
|
await this.domtoolsPromise;
|
||||||
super.disconnectedCallback();
|
super.disconnectedCallback();
|
||||||
for (const subscription of this.rxSubscriptions) {
|
for (const subscription of this.rxSubscriptions) {
|
||||||
subscription.unsubscribe();
|
subscription.unsubscribe();
|
||||||
}
|
}
|
||||||
|
for (const garbageFunction of this.garbageFunctions) {
|
||||||
|
garbageFunction();
|
||||||
|
}
|
||||||
this.dispatchEvent(new CustomEvent('deesElementDisconnected'));
|
this.dispatchEvent(new CustomEvent('deesElementDisconnected'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ export const directives = {
|
|||||||
subscribe,
|
subscribe,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// type exports
|
||||||
import type { rxjs } from '@push.rocks/smartrx';
|
import type { rxjs } from '@push.rocks/smartrx';
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
|
Reference in New Issue
Block a user