{-# 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 :: forall (m :: * -> *). MonadDOM m => HTMLButtonElement -> m Bool
checkValidity HTMLButtonElement
self
= DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"checkValidity" ()) JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)
checkValidity_ :: (MonadDOM m) => HTMLButtonElement -> m ()
checkValidity_ :: forall (m :: * -> *). MonadDOM m => HTMLButtonElement -> m ()
checkValidity_ HTMLButtonElement
self
= DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"checkValidity" ()))
reportValidity :: (MonadDOM m) => HTMLButtonElement -> m Bool
reportValidity :: forall (m :: * -> *). MonadDOM m => HTMLButtonElement -> m Bool
reportValidity HTMLButtonElement
self
= DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"reportValidity" ()) JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)
reportValidity_ :: (MonadDOM m) => HTMLButtonElement -> m ()
reportValidity_ :: forall (m :: * -> *). MonadDOM m => HTMLButtonElement -> m ()
reportValidity_ HTMLButtonElement
self
= DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"reportValidity" ()))
setCustomValidity ::
(MonadDOM m, ToJSString error) =>
HTMLButtonElement -> error -> m ()
setCustomValidity :: forall (m :: * -> *) error.
(MonadDOM m, ToJSString error) =>
HTMLButtonElement -> error -> m ()
setCustomValidity HTMLButtonElement
self error
error
= DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setCustomValidity" [error -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal error
error]))
setAutofocus :: (MonadDOM m) => HTMLButtonElement -> Bool -> m ()
setAutofocus :: forall (m :: * -> *).
MonadDOM m =>
HTMLButtonElement -> Bool -> m ()
setAutofocus HTMLButtonElement
self Bool
val
= DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (HTMLButtonElement
self HTMLButtonElement
-> Getting (DOM ()) HTMLButtonElement (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"autofocus" (Bool -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Bool
val))
getAutofocus :: (MonadDOM m) => HTMLButtonElement -> m Bool
getAutofocus :: forall (m :: * -> *). MonadDOM m => HTMLButtonElement -> m Bool
getAutofocus HTMLButtonElement
self
= DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter HTMLButtonElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"autofocus") JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)
setDisabled :: (MonadDOM m) => HTMLButtonElement -> Bool -> m ()
setDisabled :: forall (m :: * -> *).
MonadDOM m =>
HTMLButtonElement -> Bool -> m ()
setDisabled HTMLButtonElement
self Bool
val
= DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (HTMLButtonElement
self HTMLButtonElement
-> Getting (DOM ()) HTMLButtonElement (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"disabled" (Bool -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Bool
val))
getDisabled :: (MonadDOM m) => HTMLButtonElement -> m Bool
getDisabled :: forall (m :: * -> *). MonadDOM m => HTMLButtonElement -> m Bool
getDisabled HTMLButtonElement
self = DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter HTMLButtonElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"disabled") JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)
getForm :: (MonadDOM m) => HTMLButtonElement -> m HTMLFormElement
getForm :: forall (m :: * -> *).
MonadDOM m =>
HTMLButtonElement -> m HTMLFormElement
getForm HTMLButtonElement
self = DOM HTMLFormElement -> m HTMLFormElement
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter HTMLButtonElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"form") JSM JSVal -> (JSVal -> DOM HTMLFormElement) -> DOM HTMLFormElement
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM HTMLFormElement
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)
setFormAction ::
(MonadDOM m, ToJSString val) => HTMLButtonElement -> val -> m ()
setFormAction :: forall (m :: * -> *) error.
(MonadDOM m, ToJSString error) =>
HTMLButtonElement -> error -> m ()
setFormAction HTMLButtonElement
self val
val
= DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (HTMLButtonElement
self HTMLButtonElement
-> Getting (DOM ()) HTMLButtonElement (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"formAction" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))
getFormAction ::
(MonadDOM m, FromJSString result) => HTMLButtonElement -> m result
getFormAction :: forall (m :: * -> *) result.
(MonadDOM m, FromJSString result) =>
HTMLButtonElement -> m result
getFormAction HTMLButtonElement
self
= DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter HTMLButtonElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"formAction") JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)
setFormEnctype ::
(MonadDOM m, ToJSString val) => HTMLButtonElement -> val -> m ()
setFormEnctype :: forall (m :: * -> *) error.
(MonadDOM m, ToJSString error) =>
HTMLButtonElement -> error -> m ()
setFormEnctype HTMLButtonElement
self val
val
= DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (HTMLButtonElement
self HTMLButtonElement
-> Getting (DOM ()) HTMLButtonElement (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"formEnctype" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))
getFormEnctype ::
(MonadDOM m, FromJSString result) => HTMLButtonElement -> m result
getFormEnctype :: forall (m :: * -> *) result.
(MonadDOM m, FromJSString result) =>
HTMLButtonElement -> m result
getFormEnctype HTMLButtonElement
self
= DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter HTMLButtonElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"formEnctype") JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)
setFormMethod ::
(MonadDOM m, ToJSString val) => HTMLButtonElement -> val -> m ()
setFormMethod :: forall (m :: * -> *) error.
(MonadDOM m, ToJSString error) =>
HTMLButtonElement -> error -> m ()
setFormMethod HTMLButtonElement
self val
val
= DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (HTMLButtonElement
self HTMLButtonElement
-> Getting (DOM ()) HTMLButtonElement (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"formMethod" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))
getFormMethod ::
(MonadDOM m, FromJSString result) => HTMLButtonElement -> m result
getFormMethod :: forall (m :: * -> *) result.
(MonadDOM m, FromJSString result) =>
HTMLButtonElement -> m result
getFormMethod HTMLButtonElement
self
= DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter HTMLButtonElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"formMethod") JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)
setType ::
(MonadDOM m, ToJSString val) => HTMLButtonElement -> val -> m ()
setType :: forall (m :: * -> *) error.
(MonadDOM m, ToJSString error) =>
HTMLButtonElement -> error -> m ()
setType HTMLButtonElement
self val
val = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (HTMLButtonElement
self HTMLButtonElement
-> Getting (DOM ()) HTMLButtonElement (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"type" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))
getType ::
(MonadDOM m, FromJSString result) => HTMLButtonElement -> m result
getType :: forall (m :: * -> *) result.
(MonadDOM m, FromJSString result) =>
HTMLButtonElement -> m result
getType HTMLButtonElement
self = DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter HTMLButtonElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"type") JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)
setFormNoValidate ::
(MonadDOM m) => HTMLButtonElement -> Bool -> m ()
setFormNoValidate :: forall (m :: * -> *).
MonadDOM m =>
HTMLButtonElement -> Bool -> m ()
setFormNoValidate HTMLButtonElement
self Bool
val
= DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (HTMLButtonElement
self HTMLButtonElement
-> Getting (DOM ()) HTMLButtonElement (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"formNoValidate" (Bool -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Bool
val))
getFormNoValidate :: (MonadDOM m) => HTMLButtonElement -> m Bool
getFormNoValidate :: forall (m :: * -> *). MonadDOM m => HTMLButtonElement -> m Bool
getFormNoValidate HTMLButtonElement
self
= DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter HTMLButtonElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"formNoValidate") JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)
setFormTarget ::
(MonadDOM m, ToJSString val) => HTMLButtonElement -> val -> m ()
setFormTarget :: forall (m :: * -> *) error.
(MonadDOM m, ToJSString error) =>
HTMLButtonElement -> error -> m ()
setFormTarget HTMLButtonElement
self val
val
= DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (HTMLButtonElement
self HTMLButtonElement
-> Getting (DOM ()) HTMLButtonElement (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"formTarget" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))
getFormTarget ::
(MonadDOM m, FromJSString result) => HTMLButtonElement -> m result
getFormTarget :: forall (m :: * -> *) result.
(MonadDOM m, FromJSString result) =>
HTMLButtonElement -> m result
getFormTarget HTMLButtonElement
self
= DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter HTMLButtonElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"formTarget") JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)
setName ::
(MonadDOM m, ToJSString val) => HTMLButtonElement -> val -> m ()
setName :: forall (m :: * -> *) error.
(MonadDOM m, ToJSString error) =>
HTMLButtonElement -> error -> m ()
setName HTMLButtonElement
self val
val = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (HTMLButtonElement
self HTMLButtonElement
-> Getting (DOM ()) HTMLButtonElement (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"name" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))
getName ::
(MonadDOM m, FromJSString result) => HTMLButtonElement -> m result
getName :: forall (m :: * -> *) result.
(MonadDOM m, FromJSString result) =>
HTMLButtonElement -> m result
getName HTMLButtonElement
self = DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter HTMLButtonElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"name") JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)
setValue ::
(MonadDOM m, ToJSString val) => HTMLButtonElement -> val -> m ()
setValue :: forall (m :: * -> *) error.
(MonadDOM m, ToJSString error) =>
HTMLButtonElement -> error -> m ()
setValue HTMLButtonElement
self val
val = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (HTMLButtonElement
self HTMLButtonElement
-> Getting (DOM ()) HTMLButtonElement (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"value" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))
getValue ::
(MonadDOM m, FromJSString result) => HTMLButtonElement -> m result
getValue :: forall (m :: * -> *) result.
(MonadDOM m, FromJSString result) =>
HTMLButtonElement -> m result
getValue HTMLButtonElement
self
= DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter HTMLButtonElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"value") JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)
getWillValidate :: (MonadDOM m) => HTMLButtonElement -> m Bool
getWillValidate :: forall (m :: * -> *). MonadDOM m => HTMLButtonElement -> m Bool
getWillValidate HTMLButtonElement
self
= DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter HTMLButtonElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"willValidate") JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)
getValidity :: (MonadDOM m) => HTMLButtonElement -> m ValidityState
getValidity :: forall (m :: * -> *).
MonadDOM m =>
HTMLButtonElement -> m ValidityState
getValidity HTMLButtonElement
self
= DOM ValidityState -> m ValidityState
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter HTMLButtonElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"validity") JSM JSVal -> (JSVal -> DOM ValidityState) -> DOM ValidityState
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM ValidityState
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)
getValidationMessage ::
(MonadDOM m, FromJSString result) => HTMLButtonElement -> m result
getValidationMessage :: forall (m :: * -> *) result.
(MonadDOM m, FromJSString result) =>
HTMLButtonElement -> m result
getValidationMessage HTMLButtonElement
self
= DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter HTMLButtonElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"validationMessage") JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)
getLabels :: (MonadDOM m) => HTMLButtonElement -> m NodeList
getLabels :: forall (m :: * -> *). MonadDOM m => HTMLButtonElement -> m NodeList
getLabels HTMLButtonElement
self
= DOM NodeList -> m NodeList
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((HTMLButtonElement
self HTMLButtonElement
-> Getting (JSM JSVal) HTMLButtonElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter HTMLButtonElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"labels") JSM JSVal -> (JSVal -> DOM NodeList) -> DOM NodeList
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM NodeList
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)