aboutsummaryrefslogtreecommitdiff
path: root/static/ts/components/popup-element.ts
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-09-07 02:58:41 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-09-07 02:58:41 +0200
commite753d721519f72014241b3d2fc804a919f655769 (patch)
tree5f1e93ca4d3daefcffd746eb0784183664fd241e /static/ts/components/popup-element.ts
parentNormalize tsconfig formatting. (diff)
downloadcalp-e753d721519f72014241b3d2fc804a919f655769.tar.gz
calp-e753d721519f72014241b3d2fc804a919f655769.tar.xz
Document remaining javascript items.
Diffstat (limited to 'static/ts/components/popup-element.ts')
-rw-r--r--static/ts/components/popup-element.ts6
1 files changed, 4 insertions, 2 deletions
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 */