{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.PasswordCredential
(newPasswordCredential, newPasswordCredential', setIdName,
getIdName, setPasswordName, getPasswordName, setAdditionalData,
getAdditionalData, getAdditionalDataUnsafe,
getAdditionalDataUnchecked, PasswordCredential(..),
gTypePasswordCredential)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, Ord, Maybe(..))
import qualified Prelude (error)
import Data.Typeable (Typeable)
import Data.Traversable (mapM)
import Language.Javascript.JSaddle (JSM(..), JSVal(..), JSString, strictEqual, toJSVal, valToStr, valToNumber, valToBool, js, jss, jsf, jsg, function, asyncFunction, new, array, jsUndefined, (!), (!!))
import Data.Int (Int64)
import Data.Word (Word, Word64)
import JSDOM.Types
import Control.Applicative ((<$>))
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import JSDOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import JSDOM.Enums
newPasswordCredential ::
(MonadDOM m) => PasswordCredentialData -> m PasswordCredential
newPasswordCredential data'
= liftDOM
(PasswordCredential <$>
new (jsg "PasswordCredential") [toJSVal data'])
newPasswordCredential' ::
(MonadDOM m) => HTMLFormElement -> m PasswordCredential
newPasswordCredential' form
= liftDOM
(PasswordCredential <$>
new (jsg "PasswordCredential") [toJSVal form])
setIdName ::
(MonadDOM m, ToJSString val) => PasswordCredential -> val -> m ()
setIdName self val = liftDOM (self ^. jss "idName" (toJSVal val))
getIdName ::
(MonadDOM m, FromJSString result) => PasswordCredential -> m result
getIdName self
= liftDOM ((self ^. js "idName") >>= fromJSValUnchecked)
setPasswordName ::
(MonadDOM m, ToJSString val) => PasswordCredential -> val -> m ()
setPasswordName self val
= liftDOM (self ^. jss "passwordName" (toJSVal val))
getPasswordName ::
(MonadDOM m, FromJSString result) => PasswordCredential -> m result
getPasswordName self
= liftDOM ((self ^. js "passwordName") >>= fromJSValUnchecked)
setAdditionalData ::
(MonadDOM m, IsCredentialBodyType val) =>
PasswordCredential -> Maybe val -> m ()
setAdditionalData self val
= liftDOM (self ^. jss "additionalData" (toJSVal val))
getAdditionalData ::
(MonadDOM m) => PasswordCredential -> m (Maybe CredentialBodyType)
getAdditionalData self
= liftDOM ((self ^. js "additionalData") >>= fromJSVal)
getAdditionalDataUnsafe ::
(MonadDOM m, HasCallStack) =>
PasswordCredential -> m CredentialBodyType
getAdditionalDataUnsafe self
= liftDOM
(((self ^. js "additionalData") >>= fromJSVal) >>=
maybe (Prelude.error "Nothing to return") return)
getAdditionalDataUnchecked ::
(MonadDOM m) => PasswordCredential -> m CredentialBodyType
getAdditionalDataUnchecked self
= liftDOM ((self ^. js "additionalData") >>= fromJSValUnchecked)