aboutsummaryrefslogtreecommitdiff
path: root/static/components/input-list.ts
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-06-16 19:08:59 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-06-16 19:08:59 +0200
commit6f23cf88f362122cee735f8df314dc4caae87947 (patch)
treedd91dc7b296f9cf079a747bf5ddb33e38064eb4d /static/components/input-list.ts
parentAdd TODO about CSS foreground color. (diff)
downloadcalp-6f23cf88f362122cee735f8df314dc4caae87947.tar.gz
calp-6f23cf88f362122cee735f8df314dc4caae87947.tar.xz
Change to proper javascript privates.
Diffstat (limited to 'static/components/input-list.ts')
-rw-r--r--static/components/input-list.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/static/components/input-list.ts b/static/components/input-list.ts
index c31066da..34696e3e 100644
--- a/static/components/input-list.ts
+++ b/static/components/input-list.ts
@@ -10,7 +10,7 @@ class InputList extends HTMLElement {
el: HTMLInputElement;
- private _listeners: [string, (e: Event) => void][] = [];
+ #listeners: [string, (e: Event) => void][] = [];
constructor() {
super();
@@ -48,7 +48,7 @@ class InputList extends HTMLElement {
}
});
- for (let [type, proc] of this._listeners) {
+ for (let [type, proc] of this.#listeners) {
new_el.addEventListener(type, proc);
}
@@ -113,7 +113,7 @@ class InputList extends HTMLElement {
addEventListener(type: string, proc: ((e: Event) => void)) {
// if (type != 'input') throw "Only input supported";
- this._listeners.push([type, proc])
+ this.#listeners.push([type, proc])
for (let child of this.children) {
child.addEventListener(type, proc);