Closed dfordivam closed 6 years ago
One question: the current speech recognition interface require code like this
var SpeechRecognition = SpeechRecognition || webkitSpeechRecognition
var recognition = new SpeechRecognition();
as the chrome prepends "webkit" to every object and firefox doesnt. How can we support this with our FFI calls?
Right now I did this for the chrome
foreign import javascript unsafe
"new window[\"webkitSpeechRecognition\"]()"
js_newSpeechRecognition :: IO SpeechRecognition
@dfordivam Sometimes I write my own shims.js
and present a different API that is easier to work with from FFI.
As specified here
https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition
This is a heads up to all that I am working on adding the support of these APIs.
I think this feature is only available on the browsers (and not on webkit), and therefore I am only putting this in the ghcjs-dom-ffi
If anyone has worked on this before let me know :)