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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user