Hacker News new | ask | show | jobs
by noble_pleb 2148 days ago
Opinions vary on that one, does a footprint reduction by 90kb really matters in the day and age where megabytes of bloatware like angular, react, vue, etc. goes unchecked?

If adding 90kb helps me write `$(document.ready()` instead of `window.addEventListener(DOMContentLoaded)`, I'd rather add that because making code more intuitive and readable is what software engineering is about.

1 comments

I prefer to assign events handler's directly to node event properties instead of addEventListener. The only advantage to addEventListener is that you can plug in a bunch of marketing spyware nonsense without worry that its going to clobber your event assignments.