by unemployable · 2y ago · 0 comments
For other event listeners, they get removed when the DOM element is removed.
The frameworks do not solve this to any greater degree. They also just make everything invisible and behind-the-scenes and hard to debug due to their declarative nature, but that is another topic.
[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...