4 ms·
What I don't understand is why the modern js api didn't just adopt query's conventions... they're so much nicer and more expressive most of the time.
by bigfudge 6y ago
What I don't understand is why the modern js api didn't just adopt query's conventions... they're so much nicer and more expressive most of the time.
- fendy3002 6y agoThey cannot. If they do and remove the old getelementbyname, etc, then it will be breaking change. If they just add $ notation, then there will be redundancy / inconsistency with existing api. Furthermore it will break / confuse apps which use jquery. Then it's far easier to just include minified jquery into your apps when you want to use it, and you have more control about it's version, etc.
- bigfudge 6y agoI'm not saying to use $, but the elegance/composability of jQuery could have been implemented as they updated the API. And deprecating getelementbyname etc could have been done over a long period.