diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-07 02:58:41 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-07 02:58:41 +0200 |
commit | e753d721519f72014241b3d2fc804a919f655769 (patch) | |
tree | 5f1e93ca4d3daefcffd746eb0784183664fd241e /static/ts/components/changelog.ts | |
parent | Normalize tsconfig formatting. (diff) | |
download | calp-e753d721519f72014241b3d2fc804a919f655769.tar.gz calp-e753d721519f72014241b3d2fc804a919f655769.tar.xz |
Document remaining javascript items.
Diffstat (limited to '')
-rw-r--r-- | static/ts/components/changelog.ts | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/static/ts/components/changelog.ts b/static/ts/components/changelog.ts index 720d1656..8f8adc1c 100644 --- a/static/ts/components/changelog.ts +++ b/static/ts/components/changelog.ts @@ -1,32 +1,43 @@ /** - * `<changelog />` - * - * Display of a VEvents changelog. @ref{ChangeLogEntry} - * - * @privateRemarks @anchor{VEventChangelog} - * - * @category Web Components - * @mergeTarget components - * @module - */ + `<changelog />` + + Display of a VEvents changelog. @ref{ChangeLogEntry} + + TODO rename this file! + + + @privateRemarks @anchor{VEventChangelog} + + @category Web Components + @mergeTarget components + @module +*/ import { makeElement } from '../lib' import { ComponentVEvent } from './vevent' import { VEvent } from '../vevent' export { VEventChangelog } +/** + Component displaying veevents changelog. + + This component is dumb, and (almost) doesn't keep any internal state. Instead + other parts of the program should call it with a `VEvent`, which contains the + actual changelog. +*/ class VEventChangelog extends ComponentVEvent { - readonly ul: HTMLElement + /** The list holding the changelog */ + readonly #ul: HTMLElement constructor(uid?: string) { super(uid); - this.ul = makeElement('ul'); + this.#ul = makeElement('ul'); } connectedCallback() { - this.replaceChildren(this.ul); + this.replaceChildren(this.#ul); } redraw(data: VEvent) { @@ -55,6 +66,6 @@ class VEventChangelog extends ComponentVEvent { children.push(makeElement('li', { textContent: msg })); } - this.ul.replaceChildren(...children) + this.#ul.replaceChildren(...children) } } |