ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/SpeechRecognitionEvent.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from speech-api (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.SpeechRecognitionEvent
(js_newSpeechRecognitionEvent, js_getResultIndex, js_getResults, newSpeechRecognitionEvent, getResultIndex, getResults, SpeechRecognitionEvent(..), gTypeSpeechRecognitionEvent)
where
import Prelude ((.), (==), (>>=), (<$>), (++), Bool(..), Maybe(..), IO, Int, Word, Double, Float)
import qualified Prelude as P
import Control.Monad (void)
import GHCJS.Types (JSVal, JSString)
import GHCJS.Foreign (jsUndefined, jsNull)
import GHCJS.DOM.Types
import qualified GHCJS.DOM.Types as Types
import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import GHCJS.DOM.JSFFI.Generated.Enums
foreign import javascript safe "(($1, $2) => { return new globalThis[\"SpeechRecognitionEvent\"]($1, $2); })"
js_newSpeechRecognitionEvent :: JSString -> SpeechRecognitionEventInit -> IO SpeechRecognitionEvent
-- | <https://developer.mozilla.org/docs/Web/API/SpeechRecognitionEvent/SpeechRecognitionEvent MDN SpeechRecognitionEvent. documentation>
newSpeechRecognitionEvent :: (MonadDOM m, ToJSString type') => type' -> SpeechRecognitionEventInit -> m SpeechRecognitionEvent
newSpeechRecognitionEvent type' eventInitDict = liftDOM ((js_newSpeechRecognitionEvent (toJSString type') (eventInitDict)))
foreign import javascript unsafe "(($1) => { return $1[\"resultIndex\"]; })"
js_getResultIndex :: SpeechRecognitionEvent -> IO Word
-- | <https://developer.mozilla.org/docs/Web/API/SpeechRecognitionEvent/resultIndex MDN SpeechRecognitionEvent.resultIndex documentation>
getResultIndex :: (MonadDOM m) => SpeechRecognitionEvent -> m Word
getResultIndex self = liftDOM ((js_getResultIndex (self)))
foreign import javascript unsafe "(($1) => { return $1[\"results\"]; })"
js_getResults :: SpeechRecognitionEvent -> IO SpeechRecognitionResultList
-- | <https://developer.mozilla.org/docs/Web/API/SpeechRecognitionEvent/results MDN SpeechRecognitionEvent.results documentation>
getResults :: (MonadDOM m) => SpeechRecognitionEvent -> m SpeechRecognitionResultList
getResults self = liftDOM ((js_getResults (self)))