Comment

Comment by ccheney

This is how i've been doing it:

  const elements = document.querySelectorAll('li');
  [...elements].forEach((element) => element.addEventListener('click', this.onClickHandler));
parent ccheney 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton