From 6f23cf88f362122cee735f8df314dc4caae87947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 16 Jun 2022 19:08:59 +0200 Subject: Change to proper javascript privates. --- static/components/changelog.ts | 2 +- static/components/input-list.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'static/components') diff --git a/static/components/changelog.ts b/static/components/changelog.ts index 831e4ced..d08f7cb3 100644 --- a/static/components/changelog.ts +++ b/static/components/changelog.ts @@ -21,7 +21,7 @@ class VEventChangelog extends ComponentVEvent { redraw(data: VEvent) { /* TODO only redraw what is needed */ let children = [] - for (let el of data._changelog) { + for (let [_, el] of data.changelog) { let msg = ''; switch (el.type) { case 'property': 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); -- cgit v1.2.3