Anonymous functions have no reference in memory
I ran into a small bug today. Following a tutorial, I added an anonymous function as the second argument to my window.addEventListener, i.e. window.addEventListener("popstate", () => console.log("hello world")) I then struggled to remove it with window.removeEventListener("popstate", () => console.log("hello world")) At first I tried to solve it with studying in detail the documentation for window.removeEventListener. But soon I changed track: how can I find out what Event Listeners there are in my DOM (or in my window object)?...