4 ms·
Interestingly, jQuery was the first major library to switch to a feature detection model. Looking around it appears that a number of other libraries still use b
by jeresig 14y ago
Interestingly, jQuery was the first major library to switch to a feature detection model. Looking around it appears that a number of other libraries still use browser sniffing (such as MooTools, Prototype, and Dojo). The reason why I switched jQuery over to that model is largely due to my personal research into the matter during the process of writing Secrets of the JavaScript Ninja (largely as a desire to future-proof jQuery against upcoming bug fixes by major browsers).
It's rather amusing to see a case where I, unfortunately, fed the trolls trotted out as an example of future decision making. In this case the decision behind this was my own and largely done through my personal examination of the jQuery code base.
- timdown 14y agoObviously your decision to implement feature detection in jQuery was your own, but you're doing a disservice to the comp.lang.javascript regulars who laid this out for you. Describing David Mark as a troll is also unfair: I concede he has been rude to you and others, but his knowledge was and is extensive and, like it or not, was something that at the time you could learn from.