Add onConnect callback to Better
This commit is contained in:
parent
f2f4c03d69
commit
57dacb29c0
1 changed files with 3 additions and 2 deletions
|
@ -51,8 +51,9 @@ export class Better extends HTMLElement {
|
|||
|
||||
// Resolves all `connected promises
|
||||
connectedCallback() {
|
||||
this.#connected.forEach( e => e.yes(this) );
|
||||
this.#connected = [];
|
||||
if ("onConnec" in this) this.onConnect()
|
||||
this.#connected.forEach( e => e.yes(this) )
|
||||
this.#connected = []
|
||||
}
|
||||
|
||||
setContent(...content) {
|
||||
|
|
Loading…
Reference in a new issue