module JSDOM.Generated.HTMLOptionElement
(setDisabled, getDisabled, getForm, setLabel, getLabel,
setDefaultSelected, getDefaultSelected, setSelected, getSelected,
setValue, getValue, setText, getText, getIndex,
HTMLOptionElement(..), gTypeHTMLOptionElement)
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)
import JSDOM.Enums
setDisabled :: (MonadDOM m) => HTMLOptionElement -> Bool -> m ()
setDisabled self val
= liftDOM (self ^. jss "disabled" (toJSVal val))
getDisabled :: (MonadDOM m) => HTMLOptionElement -> m Bool
getDisabled self = liftDOM ((self ^. js "disabled") >>= valToBool)
getForm :: (MonadDOM m) => HTMLOptionElement -> m HTMLFormElement
getForm self = liftDOM ((self ^. js "form") >>= fromJSValUnchecked)
setLabel ::
(MonadDOM m, ToJSString val) => HTMLOptionElement -> val -> m ()
setLabel self val = liftDOM (self ^. jss "label" (toJSVal val))
getLabel ::
(MonadDOM m, FromJSString result) => HTMLOptionElement -> m result
getLabel self
= liftDOM ((self ^. js "label") >>= fromJSValUnchecked)
setDefaultSelected ::
(MonadDOM m) => HTMLOptionElement -> Bool -> m ()
setDefaultSelected self val
= liftDOM (self ^. jss "defaultSelected" (toJSVal val))
getDefaultSelected :: (MonadDOM m) => HTMLOptionElement -> m Bool
getDefaultSelected self
= liftDOM ((self ^. js "defaultSelected") >>= valToBool)
setSelected :: (MonadDOM m) => HTMLOptionElement -> Bool -> m ()
setSelected self val
= liftDOM (self ^. jss "selected" (toJSVal val))
getSelected :: (MonadDOM m) => HTMLOptionElement -> m Bool
getSelected self = liftDOM ((self ^. js "selected") >>= valToBool)
setValue ::
(MonadDOM m, ToJSString val) => HTMLOptionElement -> val -> m ()
setValue self val = liftDOM (self ^. jss "value" (toJSVal val))
getValue ::
(MonadDOM m, FromJSString result) => HTMLOptionElement -> m result
getValue self
= liftDOM ((self ^. js "value") >>= fromJSValUnchecked)
setText ::
(MonadDOM m, ToJSString val) => HTMLOptionElement -> val -> m ()
setText self val = liftDOM (self ^. jss "text" (toJSVal val))
getText ::
(MonadDOM m, FromJSString result) => HTMLOptionElement -> m result
getText self = liftDOM ((self ^. js "text") >>= fromJSValUnchecked)
getIndex :: (MonadDOM m) => HTMLOptionElement -> m Int
getIndex self
= liftDOM (round <$> ((self ^. js "index") >>= valToNumber))