jsaddle-dom-0.10.0.0: src/JSDOM/Generated/HTMLHRElement.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from html (webref). Do not edit.
module JSDOM.Generated.HTMLHRElement
(setAlign, getAlign, setColor, getColor, setNoShade, getNoShade, setSize, getSize, setWidth, getWidth, HTMLHRElement(..), gTypeHTMLHRElement)
where
import Prelude ((.), (==), (>>=), (<$>), (++), Bool(..), Maybe(..), IO, Int, Word, Double, Float)
import qualified Prelude as P
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import Language.Javascript.JSaddle (JSM, JSVal, JSString, toJSVal, valToBool, valToNumber, js, jss, jsf, jsg, new, function, asyncFunction, jsUndefined, jsNull)
import JSDOM.Types
import qualified JSDOM.Types as Types
import JSDOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import JSDOM.Generated.Enums
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-hr-align HTMLHRElement.align specification>
setAlign :: (MonadDOM m, ToJSString val) => HTMLHRElement -> val -> m ()
setAlign self val = liftDOM (void (self ^. jss "align" (toJSVal val)))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-hr-align HTMLHRElement.align specification>
getAlign :: (MonadDOM m, FromJSString result) => HTMLHRElement -> m result
getAlign self = liftDOM (((self ^. js "align") >>= fromJSValUnchecked))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-hr-color HTMLHRElement.color specification>
setColor :: (MonadDOM m, ToJSString val) => HTMLHRElement -> val -> m ()
setColor self val = liftDOM (void (self ^. jss "color" (toJSVal val)))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-hr-color HTMLHRElement.color specification>
getColor :: (MonadDOM m, FromJSString result) => HTMLHRElement -> m result
getColor self = liftDOM (((self ^. js "color") >>= fromJSValUnchecked))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-hr-noshade HTMLHRElement.noShade specification>
setNoShade :: (MonadDOM m) => HTMLHRElement -> Bool -> m ()
setNoShade self val = liftDOM (void (self ^. jss "noShade" (toJSVal val)))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-hr-noshade HTMLHRElement.noShade specification>
getNoShade :: (MonadDOM m) => HTMLHRElement -> m Bool
getNoShade self = liftDOM (((self ^. js "noShade") >>= valToBool))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-hr-size HTMLHRElement.size specification>
setSize :: (MonadDOM m, ToJSString val) => HTMLHRElement -> val -> m ()
setSize self val = liftDOM (void (self ^. jss "size" (toJSVal val)))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-hr-size HTMLHRElement.size specification>
getSize :: (MonadDOM m, FromJSString result) => HTMLHRElement -> m result
getSize self = liftDOM (((self ^. js "size") >>= fromJSValUnchecked))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-hr-width HTMLHRElement.width specification>
setWidth :: (MonadDOM m, ToJSString val) => HTMLHRElement -> val -> m ()
setWidth self val = liftDOM (void (self ^. jss "width" (toJSVal val)))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-hr-width HTMLHRElement.width specification>
getWidth :: (MonadDOM m, FromJSString result) => HTMLHRElement -> m result
getWidth self = liftDOM (((self ^. js "width") >>= fromJSValUnchecked))