{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.HTMLTextAreaElement
(checkValidity, checkValidity_, reportValidity, reportValidity_,
setCustomValidity, select, setRangeText, setRangeText4,
setSelectionRange, setAutofocus, getAutofocus, setDirName,
getDirName, setDisabled, getDisabled, getForm, setMinLength,
getMinLength, setMaxLength, getMaxLength, setName, getName,
setPlaceholder, getPlaceholder, setReadOnly, getReadOnly,
setRequired, getRequired, setRows, getRows, setCols, getCols,
setWrap, getWrap, getType, setDefaultValue, getDefaultValue,
setValue, getValue, getTextLength, getWillValidate, getValidity,
getValidationMessage, getLabels, setSelectionStart,
getSelectionStart, setSelectionEnd, getSelectionEnd,
setSelectionDirection, getSelectionDirection, setAutocomplete,
getAutocomplete, HTMLTextAreaElement(..), gTypeHTMLTextAreaElement)
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) => HTMLTextAreaElement -> m Bool
checkValidity self
= liftDOM ((self ^. jsf "checkValidity" ()) >>= valToBool)
checkValidity_ :: (MonadDOM m) => HTMLTextAreaElement -> m ()
checkValidity_ self
= liftDOM (void (self ^. jsf "checkValidity" ()))
reportValidity :: (MonadDOM m) => HTMLTextAreaElement -> m Bool
reportValidity self
= liftDOM ((self ^. jsf "reportValidity" ()) >>= valToBool)
reportValidity_ :: (MonadDOM m) => HTMLTextAreaElement -> m ()
reportValidity_ self
= liftDOM (void (self ^. jsf "reportValidity" ()))
setCustomValidity ::
(MonadDOM m, ToJSString error) =>
HTMLTextAreaElement -> error -> m ()
setCustomValidity self error
= liftDOM (void (self ^. jsf "setCustomValidity" [toJSVal error]))
select :: (MonadDOM m) => HTMLTextAreaElement -> m ()
select self = liftDOM (void (self ^. jsf "select" ()))
setRangeText ::
(MonadDOM m, ToJSString replacement) =>
HTMLTextAreaElement -> replacement -> m ()
setRangeText self replacement
= liftDOM (void (self ^. jsf "setRangeText" [toJSVal replacement]))
setRangeText4 ::
(MonadDOM m, ToJSString replacement, ToJSString selectionMode) =>
HTMLTextAreaElement ->
replacement -> Word -> Word -> Maybe selectionMode -> m ()
setRangeText4 self replacement start end selectionMode
= liftDOM
(void
(self ^. jsf "setRangeText"
[toJSVal replacement, toJSVal start, toJSVal end,
toJSVal selectionMode]))
setSelectionRange ::
(MonadDOM m, ToJSString direction) =>
HTMLTextAreaElement ->
Maybe Int -> Maybe Int -> Maybe direction -> m ()
setSelectionRange self start end direction
= liftDOM
(void
(self ^. jsf "setSelectionRange"
[toJSVal start, toJSVal end, toJSVal direction]))
setAutofocus :: (MonadDOM m) => HTMLTextAreaElement -> Bool -> m ()
setAutofocus self val
= liftDOM (self ^. jss "autofocus" (toJSVal val))
getAutofocus :: (MonadDOM m) => HTMLTextAreaElement -> m Bool
getAutofocus self
= liftDOM ((self ^. js "autofocus") >>= valToBool)
setDirName ::
(MonadDOM m, ToJSString val) => HTMLTextAreaElement -> val -> m ()
setDirName self val = liftDOM (self ^. jss "dirName" (toJSVal val))
getDirName ::
(MonadDOM m, FromJSString result) =>
HTMLTextAreaElement -> m result
getDirName self
= liftDOM ((self ^. js "dirName") >>= fromJSValUnchecked)
setDisabled :: (MonadDOM m) => HTMLTextAreaElement -> Bool -> m ()
setDisabled self val
= liftDOM (self ^. jss "disabled" (toJSVal val))
getDisabled :: (MonadDOM m) => HTMLTextAreaElement -> m Bool
getDisabled self = liftDOM ((self ^. js "disabled") >>= valToBool)
getForm :: (MonadDOM m) => HTMLTextAreaElement -> m HTMLFormElement
getForm self = liftDOM ((self ^. js "form") >>= fromJSValUnchecked)
setMinLength :: (MonadDOM m) => HTMLTextAreaElement -> Int -> m ()
setMinLength self val
= liftDOM (self ^. jss "minLength" (toJSVal val))
getMinLength :: (MonadDOM m) => HTMLTextAreaElement -> m Int
getMinLength self
= liftDOM (round <$> ((self ^. js "minLength") >>= valToNumber))
setMaxLength :: (MonadDOM m) => HTMLTextAreaElement -> Int -> m ()
setMaxLength self val
= liftDOM (self ^. jss "maxLength" (toJSVal val))
getMaxLength :: (MonadDOM m) => HTMLTextAreaElement -> m Int
getMaxLength self
= liftDOM (round <$> ((self ^. js "maxLength") >>= valToNumber))
setName ::
(MonadDOM m, ToJSString val) => HTMLTextAreaElement -> val -> m ()
setName self val = liftDOM (self ^. jss "name" (toJSVal val))
getName ::
(MonadDOM m, FromJSString result) =>
HTMLTextAreaElement -> m result
getName self = liftDOM ((self ^. js "name") >>= fromJSValUnchecked)
setPlaceholder ::
(MonadDOM m, ToJSString val) => HTMLTextAreaElement -> val -> m ()
setPlaceholder self val
= liftDOM (self ^. jss "placeholder" (toJSVal val))
getPlaceholder ::
(MonadDOM m, FromJSString result) =>
HTMLTextAreaElement -> m result
getPlaceholder self
= liftDOM ((self ^. js "placeholder") >>= fromJSValUnchecked)
setReadOnly :: (MonadDOM m) => HTMLTextAreaElement -> Bool -> m ()
setReadOnly self val
= liftDOM (self ^. jss "readOnly" (toJSVal val))
getReadOnly :: (MonadDOM m) => HTMLTextAreaElement -> m Bool
getReadOnly self = liftDOM ((self ^. js "readOnly") >>= valToBool)
setRequired :: (MonadDOM m) => HTMLTextAreaElement -> Bool -> m ()
setRequired self val
= liftDOM (self ^. jss "required" (toJSVal val))
getRequired :: (MonadDOM m) => HTMLTextAreaElement -> m Bool
getRequired self = liftDOM ((self ^. js "required") >>= valToBool)
setRows :: (MonadDOM m) => HTMLTextAreaElement -> Word -> m ()
setRows self val = liftDOM (self ^. jss "rows" (toJSVal val))
getRows :: (MonadDOM m) => HTMLTextAreaElement -> m Word
getRows self
= liftDOM (round <$> ((self ^. js "rows") >>= valToNumber))
setCols :: (MonadDOM m) => HTMLTextAreaElement -> Word -> m ()
setCols self val = liftDOM (self ^. jss "cols" (toJSVal val))
getCols :: (MonadDOM m) => HTMLTextAreaElement -> m Word
getCols self
= liftDOM (round <$> ((self ^. js "cols") >>= valToNumber))
setWrap ::
(MonadDOM m, ToJSString val) => HTMLTextAreaElement -> val -> m ()
setWrap self val = liftDOM (self ^. jss "wrap" (toJSVal val))
getWrap ::
(MonadDOM m, FromJSString result) =>
HTMLTextAreaElement -> m result
getWrap self = liftDOM ((self ^. js "wrap") >>= fromJSValUnchecked)
getType ::
(MonadDOM m, FromJSString result) =>
HTMLTextAreaElement -> m result
getType self = liftDOM ((self ^. js "type") >>= fromJSValUnchecked)
setDefaultValue ::
(MonadDOM m, ToJSString val) => HTMLTextAreaElement -> val -> m ()
setDefaultValue self val
= liftDOM (self ^. jss "defaultValue" (toJSVal val))
getDefaultValue ::
(MonadDOM m, FromJSString result) =>
HTMLTextAreaElement -> m result
getDefaultValue self
= liftDOM ((self ^. js "defaultValue") >>= fromJSValUnchecked)
setValue ::
(MonadDOM m, ToJSString val) => HTMLTextAreaElement -> val -> m ()
setValue self val = liftDOM (self ^. jss "value" (toJSVal val))
getValue ::
(MonadDOM m, FromJSString result) =>
HTMLTextAreaElement -> m result
getValue self
= liftDOM ((self ^. js "value") >>= fromJSValUnchecked)
getTextLength :: (MonadDOM m) => HTMLTextAreaElement -> m Word
getTextLength self
= liftDOM (round <$> ((self ^. js "textLength") >>= valToNumber))
getWillValidate :: (MonadDOM m) => HTMLTextAreaElement -> m Bool
getWillValidate self
= liftDOM ((self ^. js "willValidate") >>= valToBool)
getValidity ::
(MonadDOM m) => HTMLTextAreaElement -> m ValidityState
getValidity self
= liftDOM ((self ^. js "validity") >>= fromJSValUnchecked)
getValidationMessage ::
(MonadDOM m, FromJSString result) =>
HTMLTextAreaElement -> m result
getValidationMessage self
= liftDOM ((self ^. js "validationMessage") >>= fromJSValUnchecked)
getLabels :: (MonadDOM m) => HTMLTextAreaElement -> m NodeList
getLabels self
= liftDOM ((self ^. js "labels") >>= fromJSValUnchecked)
setSelectionStart ::
(MonadDOM m) => HTMLTextAreaElement -> Int -> m ()
setSelectionStart self val
= liftDOM (self ^. jss "selectionStart" (toJSVal val))
getSelectionStart :: (MonadDOM m) => HTMLTextAreaElement -> m Int
getSelectionStart self
= liftDOM
(round <$> ((self ^. js "selectionStart") >>= valToNumber))
setSelectionEnd ::
(MonadDOM m) => HTMLTextAreaElement -> Int -> m ()
setSelectionEnd self val
= liftDOM (self ^. jss "selectionEnd" (toJSVal val))
getSelectionEnd :: (MonadDOM m) => HTMLTextAreaElement -> m Int
getSelectionEnd self
= liftDOM (round <$> ((self ^. js "selectionEnd") >>= valToNumber))
setSelectionDirection ::
(MonadDOM m, ToJSString val) => HTMLTextAreaElement -> val -> m ()
setSelectionDirection self val
= liftDOM (self ^. jss "selectionDirection" (toJSVal val))
getSelectionDirection ::
(MonadDOM m, FromJSString result) =>
HTMLTextAreaElement -> m result
getSelectionDirection self
= liftDOM
((self ^. js "selectionDirection") >>= fromJSValUnchecked)
setAutocomplete ::
(MonadDOM m, ToJSString val) => HTMLTextAreaElement -> val -> m ()
setAutocomplete self val
= liftDOM (self ^. jss "autocomplete" (toJSVal val))
getAutocomplete ::
(MonadDOM m, FromJSString result) =>
HTMLTextAreaElement -> m result
getAutocomplete self
= liftDOM ((self ^. js "autocomplete") >>= fromJSValUnchecked)