Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Call An Event Handler For A Function In A JavaScript Class

TODO: See this first and consolidate: 2ai9647o

I thought that you had to put calls to class functions in like this:

Code

pingButton.addEventListener("click", () => {
  w.ping()
})

But this work fine:

Code

pingButton.addEventListener("click", w.ping)

I need to go back and look at the code that send me down this path of investigation to figure out what else was up