Re:Bootstrap 5 will remove jQuery as a dependency
by LorenzA on Wednesday February 13, 2019 @03:00AM
(#19151280)
document.querySelectorAll('.tpm_sensors').forEach((sensor) => {if (sensor.pressure < threshold) { fixBeforeIDie(); }});
[ Parent
| on HN ]
Re:Bootstrap 5 will remove jQuery as a dependency
by phponpcp on Wednesday February 13, 2019 @09:29AM
(#19153305)
Then this breaks in older browsers because forEach isn't a method on a NodeList. So you have to polyfill in features to do [...document.querySelectorAll('.tpm_sensors')].forEach(...);
Re:Bootstrap 5 will remove jQuery as a dependency
by ulucs on Wednesday February 13, 2019 @03:59AM
(#19151552)
and you usually define $ and $$ as querySelector and querySelectorAll at the beginning of the file if you don't like writing them all out, so they're exactly the same length
Re:Bootstrap 5 will remove jQuery as a dependency
by IgorPartola on Wednesday February 13, 2019 @07:49AM
(#19152615)
I remember the mess that came before jQuery. This is quite literally what we did back then, just with a custom made snippet of JS for finding by id and by class. It sucked. I mean to me Bootstrap is just a black box library, I don’t care how it works as long as it does. But this is going to suck for those working on its code.