ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/BlobEvent.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from mediastream-recording (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.BlobEvent
(js_newBlobEvent, js_getData, js_getTimecode, newBlobEvent, getData, getTimecode, BlobEvent(..), gTypeBlobEvent)
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[\"BlobEvent\"]($1, $2); })"
js_newBlobEvent :: JSString -> BlobEventInit -> IO BlobEvent
-- | <https://developer.mozilla.org/docs/Web/API/BlobEvent/BlobEvent MDN BlobEvent. documentation>
newBlobEvent :: (MonadDOM m, ToJSString type') => type' -> BlobEventInit -> m BlobEvent
newBlobEvent type' eventInitDict = liftDOM ((js_newBlobEvent (toJSString type') (eventInitDict)))
foreign import javascript unsafe "(($1) => { return $1[\"data\"]; })"
js_getData :: BlobEvent -> IO Blob
-- | <https://developer.mozilla.org/docs/Web/API/BlobEvent/data MDN BlobEvent.data documentation>
getData :: (MonadDOM m) => BlobEvent -> m Blob
getData self = liftDOM ((js_getData (self)))
foreign import javascript unsafe "(($1) => { return $1[\"timecode\"]; })"
js_getTimecode :: BlobEvent -> IO Double
-- | <https://developer.mozilla.org/docs/Web/API/BlobEvent/timecode MDN BlobEvent.timecode documentation>
getTimecode :: (MonadDOM m) => BlobEvent -> m Double
getTimecode self = liftDOM ((js_getTimecode (self)))