4 ms·
> What could have been done differently to end up at a good solution? Something like a standardized API for feature-detection, possibly.
by kibwen 9y ago
> What could have been done differently to end up at a good solution?
Something like a standardized API for feature-detection, possibly.
- jbergstroem 9y agoThe client hints draft is somewhat helping here (10 years later): http://httpwg.org/http-extensions/client-hints.html http://httpwg.org/http-extensions/client-hints.html
- bzbarsky 9y agoThat existed: see DOMImplementation.hasFeature. Turned out, there were cases where browsers returned "true" while their implementation of the feature did not do what the authors wanted. There were various reasons for this: the feature detection being decoupled from the feature implementation, bugs in the feature that could not be captured by the implementation, the detection not being fine-grained enough, etc. And there were cases where hasFeature returned "false" while the feature was usable, for similar reasons. Long story short, at this point the implementation of hasFeature per spec, and in browsers, is "return true".
- sebcat 9y agoAt first I though feature detection as in Sobel, LoG, &c, which made me really confused when reading the replies.