{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.HTMLButtonElement
(checkValidity, checkValidity_, reportValidity, reportValidity_,
setCustomValidity, setAutofocus, getAutofocus, setDisabled,
getDisabled, getForm, setFormAction, getFormAction, setFormEnctype,
getFormEnctype, setFormMethod, getFormMethod, setType, getType,
setFormNoValidate, getFormNoValidate, setFormTarget, getFormTarget,
setName, getName, setValue, getValue, getWillValidate, getValidity,
getValidationMessage, getLabels, HTMLButtonElement(..),
gTypeHTMLButtonElement)
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
checkValidity :: (MonadDOM m) => HTMLButtonElement -> m Bool
checkValidity self
= liftDOM ((self ^. jsf "checkValidity" ()) >>= valToBool)
checkValidity_ :: (MonadDOM m) => HTMLButtonElement -> m ()
checkValidity_ self
= liftDOM (void (self ^. jsf "checkValidity" ()))
reportValidity :: (MonadDOM m) => HTMLButtonElement -> m Bool
reportValidity self
= liftDOM ((self ^. jsf "reportValidity" ()) >>= valToBool)
reportValidity_ :: (MonadDOM m) => HTMLButtonElement -> m ()
reportValidity_ self
= liftDOM (void (self ^. jsf "reportValidity" ()))
setCustomValidity ::
(MonadDOM m, ToJSString error) =>
HTMLButtonElement -> error -> m ()
setCustomValidity self error
= liftDOM (void (self ^. jsf "setCustomValidity" [toJSVal error]))
setAutofocus :: (MonadDOM m) => HTMLButtonElement -> Bool -> m ()
setAutofocus self val
= liftDOM (self ^. jss "autofocus" (toJSVal val))
getAutofocus :: (MonadDOM m) => HTMLButtonElement -> m Bool
getAutofocus self
= liftDOM ((self ^. js "autofocus") >>= valToBool)
setDisabled :: (MonadDOM m) => HTMLButtonElement -> Bool -> m ()
setDisabled self val
= liftDOM (self ^. jss "disabled" (toJSVal val))
getDisabled :: (MonadDOM m) => HTMLButtonElement -> m Bool
getDisabled self = liftDOM ((self ^. js "disabled") >>= valToBool)
getForm :: (MonadDOM m) => HTMLButtonElement -> m HTMLFormElement
getForm self = liftDOM ((self ^. js "form") >>= fromJSValUnchecked)
setFormAction ::
(MonadDOM m, ToJSString val) => HTMLButtonElement -> val -> m ()
setFormAction self val
= liftDOM (self ^. jss "formAction" (toJSVal val))
getFormAction ::
(MonadDOM m, FromJSString result) => HTMLButtonElement -> m result
getFormAction self
= liftDOM ((self ^. js "formAction") >>= fromJSValUnchecked)
setFormEnctype ::
(MonadDOM m, ToJSString val) => HTMLButtonElement -> val -> m ()
setFormEnctype self val
= liftDOM (self ^. jss "formEnctype" (toJSVal val))
getFormEnctype ::
(MonadDOM m, FromJSString result) => HTMLButtonElement -> m result
getFormEnctype self
= liftDOM ((self ^. js "formEnctype") >>= fromJSValUnchecked)
setFormMethod ::
(MonadDOM m, ToJSString val) => HTMLButtonElement -> val -> m ()
setFormMethod self val
= liftDOM (self ^. jss "formMethod" (toJSVal val))
getFormMethod ::
(MonadDOM m, FromJSString result) => HTMLButtonElement -> m result
getFormMethod self
= liftDOM ((self ^. js "formMethod") >>= fromJSValUnchecked)
setType ::
(MonadDOM m, ToJSString val) => HTMLButtonElement -> val -> m ()
setType self val = liftDOM (self ^. jss "type" (toJSVal val))
getType ::
(MonadDOM m, FromJSString result) => HTMLButtonElement -> m result
getType self = liftDOM ((self ^. js "type") >>= fromJSValUnchecked)
setFormNoValidate ::
(MonadDOM m) => HTMLButtonElement -> Bool -> m ()
setFormNoValidate self val
= liftDOM (self ^. jss "formNoValidate" (toJSVal val))
getFormNoValidate :: (MonadDOM m) => HTMLButtonElement -> m Bool
getFormNoValidate self
= liftDOM ((self ^. js "formNoValidate") >>= valToBool)
setFormTarget ::
(MonadDOM m, ToJSString val) => HTMLButtonElement -> val -> m ()
setFormTarget self val
= liftDOM (self ^. jss "formTarget" (toJSVal val))
getFormTarget ::
(MonadDOM m, FromJSString result) => HTMLButtonElement -> m result
getFormTarget self
= liftDOM ((self ^. js "formTarget") >>= fromJSValUnchecked)
setName ::
(MonadDOM m, ToJSString val) => HTMLButtonElement -> val -> m ()
setName self val = liftDOM (self ^. jss "name" (toJSVal val))
getName ::
(MonadDOM m, FromJSString result) => HTMLButtonElement -> m result
getName self = liftDOM ((self ^. js "name") >>= fromJSValUnchecked)
setValue ::
(MonadDOM m, ToJSString val) => HTMLButtonElement -> val -> m ()
setValue self val = liftDOM (self ^. jss "value" (toJSVal val))
getValue ::
(MonadDOM m, FromJSString result) => HTMLButtonElement -> m result
getValue self
= liftDOM ((self ^. js "value") >>= fromJSValUnchecked)
getWillValidate :: (MonadDOM m) => HTMLButtonElement -> m Bool
getWillValidate self
= liftDOM ((self ^. js "willValidate") >>= valToBool)
getValidity :: (MonadDOM m) => HTMLButtonElement -> m ValidityState
getValidity self
= liftDOM ((self ^. js "validity") >>= fromJSValUnchecked)
getValidationMessage ::
(MonadDOM m, FromJSString result) => HTMLButtonElement -> m result
getValidationMessage self
= liftDOM ((self ^. js "validationMessage") >>= fromJSValUnchecked)
getLabels :: (MonadDOM m) => HTMLButtonElement -> m NodeList
getLabels self
= liftDOM ((self ^. js "labels") >>= fromJSValUnchecked)