aboutsummaryrefslogtreecommitdiff
path: root/static/ts/components/vevent.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/vevent.ts
parentNormalize tsconfig formatting. (diff)
downloadcalp-e753d721519f72014241b3d2fc804a919f655769.tar.gz
calp-e753d721519f72014241b3d2fc804a919f655769.tar.xz
Document remaining javascript items.
Diffstat (limited to 'static/ts/components/vevent.ts')
-rw-r--r--static/ts/components/vevent.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/static/ts/components/vevent.ts b/static/ts/components/vevent.ts
index 1d400e1e..50ff4a30 100644
--- a/static/ts/components/vevent.ts
+++ b/static/ts/components/vevent.ts
@@ -16,9 +16,23 @@ export { ComponentVEvent }
import { vcal_objects } from '../globals'
import { VEvent } from '../vevent'
+/**
+ Base class for all Web Components closely linked with VEvents.
+
+ TODO document how templates work.
+
+ TODO document lifecycle, and how objects are fetched from the "global" store.
+ */
abstract class ComponentVEvent extends HTMLElement {
+ /**
+ The template for this event.
+
+ TODO document how this is populate
+ */
template?: HTMLTemplateElement
+
+ /** The UID of the VEvent we are tracking */
uid: string
/**
@@ -72,6 +86,11 @@ abstract class ComponentVEvent extends HTMLElement {
should take care of that some other way */
}
+ /**
+ Called when the component is mounted.
+
+ Redraws the target if the wanted object is available at that time.
+ */
connectedCallback() {
let uid = this.dataset.uid
if (uid) {