1
0
mirror of https://github.com/koloml/furbooru-tagging-assistant.git synced 2025-12-24 15:12:58 +00:00

Added getter for checking if initialization is completed

This commit is contained in:
2024-04-04 02:35:09 +04:00
parent 71b055f7f5
commit 93e06e6ea1

View File

@@ -51,6 +51,15 @@ export class BaseComponent {
return this.#container;
}
/**
* Check if the component is initialized already. If not checked, subsequent calls to the `initialize` method will
* throw an error.
* @return {boolean}
*/
get isInitialized() {
return this.#isInitialized;
}
/**
* Emit the custom event on the container element.
* @param {keyof HTMLElementEventMap|string} event The event name.