packages feed

ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/RTCDataChannelEventInit.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.RTCDataChannelEventInit
       (js_newRTCDataChannelEventInit, js_setChannel, js_getChannel, newRTCDataChannelEventInit, setChannel, getChannel, RTCDataChannelEventInit(..), gTypeRTCDataChannelEventInit)
       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 ({\"channel\": $1}); })"
        js_newRTCDataChannelEventInit :: RTCDataChannel -> IO RTCDataChannelEventInit
-- | <https://w3c.github.io/webrtc-pc/#dom-rtcdatachanneleventinit RTCDataChannelEventInit specification>
newRTCDataChannelEventInit :: (MonadDOM m) => RTCDataChannel -> m RTCDataChannelEventInit
newRTCDataChannelEventInit channel = liftDOM ((js_newRTCDataChannelEventInit (channel)))

foreign import javascript safe "(($1, $2) => { $1[\"channel\"] = $2; })"
        js_setChannel :: RTCDataChannelEventInit -> RTCDataChannel -> IO ()
-- | <https://w3c.github.io/webrtc-pc/#dom-rtcdatachanneleventinit-channel RTCDataChannelEventInit.channel specification>
setChannel :: (MonadDOM m) => RTCDataChannelEventInit -> RTCDataChannel -> m ()
setChannel self val = liftDOM (void ((js_setChannel (self) (val))))

foreign import javascript unsafe "(($1) => { return $1[\"channel\"]; })"
        js_getChannel :: RTCDataChannelEventInit -> IO RTCDataChannel
-- | <https://w3c.github.io/webrtc-pc/#dom-rtcdatachanneleventinit-channel RTCDataChannelEventInit.channel specification>
getChannel :: (MonadDOM m) => RTCDataChannelEventInit -> m RTCDataChannel
getChannel self = liftDOM ((js_getChannel (self)))