Hacker News new | past | comments | ask | show | jobs | submit login

Using user agents to detect features is the wrong way to do it because you’ll have these exact problems.

To determine if a browser has the text to speech API just check if the webkitSpeechRecognition object exists (if that’s the one you’re using). It will exist in Chrome and will not exist in other browsers that lack the feature.






> * It will exist in Chrome and will not exist in other browsers that lack the feature.*

An incorrect assumption stated as fact with such great confidence. Good job.

Even on the face of it, any engineer would know this can't be true.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: