diff --git a/src/lib/components/base/BaseComponent.js b/src/lib/components/base/BaseComponent.js index a9c1ad4..90838ff 100644 --- a/src/lib/components/base/BaseComponent.js +++ b/src/lib/components/base/BaseComponent.js @@ -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.