packages feed

ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/DigitalCredential.hs

{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from digital-credentials (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.DigitalCredential
       (js_toJSON, js_userAgentAllowsProtocol, js_getProtocol, js_getData, toJSON, toJSON_, userAgentAllowsProtocol, userAgentAllowsProtocol_, getProtocol, getData, DigitalCredential(..), gTypeDigitalCredential)
       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 $1[\"toJSON\"](); })"
        js_toJSON :: DigitalCredential -> IO GObject
toJSON :: (MonadDOM m) => DigitalCredential -> m GObject
toJSON self = liftDOM ((js_toJSON (self)))

toJSON_ :: (MonadDOM m) => DigitalCredential -> m ()
toJSON_ self = liftDOM (void ((js_toJSON (self))))

foreign import javascript safe "(($1) => { return globalThis[\"DigitalCredential\"][\"userAgentAllowsProtocol\"]($1); })"
        js_userAgentAllowsProtocol :: JSString -> IO Bool
-- | <https://w3c-fedid.github.io/digital-credentials/#dom-digitalcredential-useragentallowsprotocol DigitalCredential.userAgentAllowsProtocol specification>
userAgentAllowsProtocol :: (MonadDOM m, ToJSString protocol) => protocol -> m Bool
userAgentAllowsProtocol protocol = liftDOM ((js_userAgentAllowsProtocol (toJSString protocol)))

-- | <https://w3c-fedid.github.io/digital-credentials/#dom-digitalcredential-useragentallowsprotocol DigitalCredential.userAgentAllowsProtocol specification>
userAgentAllowsProtocol_ :: (MonadDOM m, ToJSString protocol) => protocol -> m ()
userAgentAllowsProtocol_ protocol = liftDOM (void ((js_userAgentAllowsProtocol (toJSString protocol))))

foreign import javascript unsafe "(($1) => { return $1[\"protocol\"]; })"
        js_getProtocol :: DigitalCredential -> IO DigitalCredentialProtocol
-- | <https://w3c-fedid.github.io/digital-credentials/#dom-digitalcredential-protocol DigitalCredential.protocol specification>
getProtocol :: (MonadDOM m) => DigitalCredential -> m DigitalCredentialProtocol
getProtocol self = liftDOM ((js_getProtocol (self)))

foreign import javascript unsafe "(($1) => { return $1[\"data\"]; })"
        js_getData :: DigitalCredential -> IO GObject
-- | <https://w3c-fedid.github.io/digital-credentials/#dom-digitalcredential-data DigitalCredential.data specification>
getData :: (MonadDOM m) => DigitalCredential -> m GObject
getData self = liftDOM ((js_getData (self)))