From ddea2c92dc2729a37e4c2dc388576f2574072f90 Mon Sep 17 00:00:00 2001 From: sdegutis Date: Sat, 17 Aug 2024 11:57:08 -0500 Subject: [PATCH] Rename event. --- site/samples/sample5.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/samples/sample5.tsx b/site/samples/sample5.tsx index 9a900a2..308d428 100644 --- a/site/samples/sample5.tsx +++ b/site/samples/sample5.tsx @@ -40,7 +40,7 @@ class List extends EventTarget { this.ul.append(item.li); this.dispatchEvent(new Event('item-added')); - this.itemUnlisteners.set(item, listen(item, 'changed', () => { + this.itemUnlisteners.set(item, listen(item, 'toggled', () => { this.dispatchEvent(new Event('item-toggled')); })); @@ -90,7 +90,7 @@ class Item extends EventTarget { this.done = !this.done; this.li.classList.toggle('done', this.done); this.#checkbox.checked = this.done; - this.dispatchEvent(new Event('changed')); + this.dispatchEvent(new Event('toggled')); } }