Created
March 23, 2011 20:43
-
-
Save jeremys/883920 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tested only on Chrome and Firefox.