From e753d721519f72014241b3d2fc804a919f655769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 7 Sep 2023 02:58:41 +0200 Subject: Document remaining javascript items. --- static/ts/components/popup-element.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'static/ts/components/popup-element.ts') diff --git a/static/ts/components/popup-element.ts b/static/ts/components/popup-element.ts index cc011ce3..a1e81f0e 100644 --- a/static/ts/components/popup-element.ts +++ b/static/ts/components/popup-element.ts @@ -90,6 +90,7 @@ class PopupElement extends ComponentVEvent { this.replaceChildren(body); } + /** ['visible'] */ static get observedAttributes() { return ['visible']; } @@ -99,7 +100,7 @@ class PopupElement extends ComponentVEvent { case 'visible': if (newValue !== null) /* Only run resize code when showing the popup */ - this.onVisibilityChange() + this.#onVisibilityChange() break; } } @@ -114,6 +115,7 @@ class PopupElement extends ComponentVEvent { return this.hasAttribute('visible'); } + /** Set the visibility status of the component. */ set visible(isVisible: boolean) { if (isVisible) { this.setAttribute('visible', 'visible'); @@ -122,7 +124,7 @@ class PopupElement extends ComponentVEvent { } } - private onVisibilityChange() { + #onVisibilityChange() { console.log('here'); /* TODO better way to find root */ -- cgit v1.2.3