News for hackers. Stuff that matters.
Re:You might not need jQuery by sinkasapa on Friday January 31, 2014 @04:54PM (#7159420)
I don't think Array.prototype.forEach.call(el.querySelectorAll(selector)) is complex enough to pull in a new library.
Re:You might not need jQuery by hrktb on Saturday February 01, 2014 @11:02AM (#7161952)
It's not, but then you fall on IE9+ land, and you'll have to check if querySelectorAll returns anything first.

The sibling comment points out how a function silently failing when given empty value can be deceiptive. I guess your way of seeing it would be also in line with checking valid values before using them.

It's a very sane approach, and it requires more care and attention for each step. I'm not against it, but usually I'm not sure to see a real payoff for very conservative programming in front end DOM manipulation, I tend to prefer taking some performance hit and ignore the nitty gritty details as well as the small errors, as long as it can be recovered at a higher level.