ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/RTCErrorEventInit.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from webrtc (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.RTCErrorEventInit
(js_newRTCErrorEventInit, js_setError, js_getError, newRTCErrorEventInit, setError, getError, RTCErrorEventInit(..), gTypeRTCErrorEventInit)
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) => { return ({\"error\": $1}); })"
js_newRTCErrorEventInit :: RTCError -> IO RTCErrorEventInit
-- | <https://w3c.github.io/webrtc-pc/#dom-rtcerroreventinit RTCErrorEventInit specification>
newRTCErrorEventInit :: (MonadDOM m) => RTCError -> m RTCErrorEventInit
newRTCErrorEventInit error = liftDOM ((js_newRTCErrorEventInit (error)))
foreign import javascript safe "(($1, $2) => { $1[\"error\"] = $2; })"
js_setError :: RTCErrorEventInit -> RTCError -> IO ()
-- | <https://w3c.github.io/webrtc-pc/#dom-rtcerroreventinit-error RTCErrorEventInit.error specification>
setError :: (MonadDOM m) => RTCErrorEventInit -> RTCError -> m ()
setError self val = liftDOM (void ((js_setError (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"error\"]; })"
js_getError :: RTCErrorEventInit -> IO RTCError
-- | <https://w3c.github.io/webrtc-pc/#dom-rtcerroreventinit-error RTCErrorEventInit.error specification>
getError :: (MonadDOM m) => RTCErrorEventInit -> m RTCError
getError self = liftDOM ((js_getError (self)))