Skip to content

Instantly share code, notes, and snippets.

@jeremys
Created March 23, 2011 20:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremys/883920 to your computer and use it in GitHub Desktop.
Save jeremys/883920 to your computer and use it in GitHub Desktop.
function support_speech_attribute() {
var elem = document.createElement('input');
return 'speech' in elem || 'onwebkitspeechchange' in elem;
// update based on https://github.com/Modernizr/Modernizr/wiki
// - 'webkitSpeech' in elem -> does`t work correctly in all versions of Chromium based
// browsers: can return false even if they have support for speech (http://i.imgur.com/2Y40n.png)
// - testing with 'onwebkitspeechchange' seems to fix this problem
}
@jeremys
Copy link
Author

jeremys commented Mar 23, 2011

Tested only on Chrome and Firefox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment