packages feed

jsaddle-dom-0.10.0.0: src/JSDOM/Generated/HTMLParamElement.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.HTMLParamElement
       (setName, getName, setValue, getValue, setType, getType, setValueType, getValueType, HTMLParamElement(..), gTypeHTMLParamElement)
       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-param-name HTMLParamElement.name specification>
setName :: (MonadDOM m, ToJSString val) => HTMLParamElement -> val -> m ()
setName self val = liftDOM (void (self ^. jss "name" (toJSVal val)))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-param-name HTMLParamElement.name specification>
getName :: (MonadDOM m, FromJSString result) => HTMLParamElement -> m result
getName self = liftDOM (((self ^. js "name") >>= fromJSValUnchecked))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-param-value HTMLParamElement.value specification>
setValue :: (MonadDOM m, ToJSString val) => HTMLParamElement -> val -> m ()
setValue self val = liftDOM (void (self ^. jss "value" (toJSVal val)))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-param-value HTMLParamElement.value specification>
getValue :: (MonadDOM m, FromJSString result) => HTMLParamElement -> m result
getValue self = liftDOM (((self ^. js "value") >>= fromJSValUnchecked))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-param-type HTMLParamElement.type specification>
setType :: (MonadDOM m, ToJSString val) => HTMLParamElement -> val -> m ()
setType self val = liftDOM (void (self ^. jss "type" (toJSVal val)))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-param-type HTMLParamElement.type specification>
getType :: (MonadDOM m, FromJSString result) => HTMLParamElement -> m result
getType self = liftDOM (((self ^. js "type") >>= fromJSValUnchecked))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-param-valuetype HTMLParamElement.valueType specification>
setValueType :: (MonadDOM m, ToJSString val) => HTMLParamElement -> val -> m ()
setValueType self val = liftDOM (void (self ^. jss "valueType" (toJSVal val)))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-param-valuetype HTMLParamElement.valueType specification>
getValueType :: (MonadDOM m, FromJSString result) => HTMLParamElement -> m result
getValueType self = liftDOM (((self ^. js "valueType") >>= fromJSValUnchecked))