Skip to content

Commit

Permalink
Rename event.
Browse files Browse the repository at this point in the history
  • Loading branch information
thesoftwarephilosopher committed Aug 17, 2024
1 parent e12f117 commit ddea2c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions site/samples/sample5.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}));

Expand Down Expand Up @@ -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'));
}

}
Expand Down

0 comments on commit ddea2c9

Please sign in to comment.