14 ms·
Using vanilla js is still a massive pita even with ES6. Nowt's going to beat $(".thing") vs: document.getElementByClassNameWhichWordsDidIForgetToCapitaliz
by mattmanser 10y ago
Using vanilla js is still a massive pita even with ES6.
Nowt's going to beat $(".thing") vs:
document.getElementByClassNameWhichWordsDidIForgetToCapitalizeThisTimeManVanillaJavascriptSucks
Or
document.querySelectorWhoopsNoIMeantQuerySelectorAllGodVanillaJavascriptSucks
Design by committee, you get crap. Ease of use is incredibly important. And don't even get me started on on the fly dom manipulation, vanilla js really sucks for that.
let div = document.createElement("div");
div.iMAlreadyBoredTyping = "Yes";
node.appendChild(div);
vs
$(node).append($("<div>").data("quick", 1"));