2021-04-14 22:56:59 +02:00
|
|
|
import { LitElement } from 'lit';
|
2020-06-26 14:54:36 +02:00
|
|
|
import { Events } from '@converse/skeletor/src/events.js';
|
|
|
|
|
2020-02-10 11:23:55 +01:00
|
|
|
|
|
|
|
export class CustomElement extends LitElement {
|
|
|
|
|
|
|
|
createRenderRoot () {
|
|
|
|
// Render without the shadow DOM
|
|
|
|
return this;
|
|
|
|
}
|
2020-06-26 14:54:36 +02:00
|
|
|
|
2021-09-23 13:57:46 +02:00
|
|
|
connectedCallback () {
|
|
|
|
super.connectedCallback();
|
|
|
|
this.initialize?.();
|
|
|
|
}
|
|
|
|
|
2020-06-26 14:54:36 +02:00
|
|
|
disconnectedCallback () {
|
2020-09-26 21:42:42 +02:00
|
|
|
super.disconnectedCallback();
|
2020-06-26 14:54:36 +02:00
|
|
|
this.stopListening();
|
|
|
|
}
|
2020-02-10 11:23:55 +01:00
|
|
|
}
|
2022-02-09 21:07:03 +01:00
|
|
|
|
|
|
|
Object.assign(CustomElement.prototype, Events);
|