packages feed

ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/HTMLOutputElement.hs

{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from html (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.HTMLOutputElement
       (js_checkValidity, js_reportValidity, js_setCustomValidity, js_getHtmlFor, js_getForm, js_setName, js_getName, js_getType, js_setDefaultValue, js_getDefaultValue, js_setValue, js_getValue, js_getWillValidate, js_getValidity, js_getValidationMessage, js_getLabels, checkValidity, checkValidity_, reportValidity, reportValidity_, setCustomValidity, getHtmlFor, getForm, getFormUnsafe, getFormUnchecked, setName, getName, getType, setDefaultValue, getDefaultValue, setValue, getValue, getWillValidate, getValidity, getValidationMessage, getLabels, HTMLOutputElement(..), gTypeHTMLOutputElement)
       where
import Prelude ((.), (==), (>>=), (<$>), (++), Bool(..), Maybe(..), IO, Int, Word, Double, Float)
import qualified Prelude as P
import Control.Monad (void)
import GHCJS.Types (JSVal, JSString)
import GHCJS.Foreign (jsUndefined, jsNull)
import GHCJS.DOM.Types
import qualified GHCJS.DOM.Types as Types
import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import GHCJS.DOM.JSFFI.Generated.Enums

foreign import javascript safe "(($1) => { return $1[\"checkValidity\"](); })"
        js_checkValidity :: HTMLOutputElement -> IO Bool
-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/checkValidity MDN HTMLOutputElement.checkValidity documentation>
checkValidity :: (MonadDOM m) => HTMLOutputElement -> m Bool
checkValidity self = liftDOM ((js_checkValidity (self)))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/checkValidity MDN HTMLOutputElement.checkValidity documentation>
checkValidity_ :: (MonadDOM m) => HTMLOutputElement -> m ()
checkValidity_ self = liftDOM (void ((js_checkValidity (self))))

foreign import javascript safe "(($1) => { return $1[\"reportValidity\"](); })"
        js_reportValidity :: HTMLOutputElement -> IO Bool
-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/reportValidity MDN HTMLOutputElement.reportValidity documentation>
reportValidity :: (MonadDOM m) => HTMLOutputElement -> m Bool
reportValidity self = liftDOM ((js_reportValidity (self)))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/reportValidity MDN HTMLOutputElement.reportValidity documentation>
reportValidity_ :: (MonadDOM m) => HTMLOutputElement -> m ()
reportValidity_ self = liftDOM (void ((js_reportValidity (self))))

foreign import javascript safe "(($1, $2) => { return $1[\"setCustomValidity\"]($2); })"
        js_setCustomValidity :: HTMLOutputElement -> JSString -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/setCustomValidity MDN HTMLOutputElement.setCustomValidity documentation>
setCustomValidity :: (MonadDOM m, ToJSString error) => HTMLOutputElement -> error -> m ()
setCustomValidity self error = liftDOM (void ((js_setCustomValidity (self) (toJSString error))))

foreign import javascript unsafe "(($1) => { return $1[\"htmlFor\"]; })"
        js_getHtmlFor :: HTMLOutputElement -> IO DOMTokenList
-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/htmlFor MDN HTMLOutputElement.htmlFor documentation>
getHtmlFor :: (MonadDOM m) => HTMLOutputElement -> m DOMTokenList
getHtmlFor self = liftDOM ((js_getHtmlFor (self)))

foreign import javascript unsafe "(($1) => { return $1[\"form\"]; })"
        js_getForm :: HTMLOutputElement -> IO JSVal
-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/form MDN HTMLOutputElement.form documentation>
getForm :: (MonadDOM m) => HTMLOutputElement -> m (Maybe HTMLFormElement)
getForm self = liftDOM (((js_getForm (self)) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/form MDN HTMLOutputElement.form documentation>
getFormUnsafe :: (MonadDOM m, HasCallStack) => HTMLOutputElement -> m HTMLFormElement
getFormUnsafe self = liftDOM ((((js_getForm (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/form MDN HTMLOutputElement.form documentation>
getFormUnchecked :: (MonadDOM m) => HTMLOutputElement -> m HTMLFormElement
getFormUnchecked self = liftDOM ((pFromJSVal <$> (js_getForm (self))))

foreign import javascript safe "(($1, $2) => { $1[\"name\"] = $2; })"
        js_setName :: HTMLOutputElement -> JSString -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/name MDN HTMLOutputElement.name documentation>
setName :: (MonadDOM m, ToJSString val) => HTMLOutputElement -> val -> m ()
setName self val = liftDOM (void ((js_setName (self) (toJSString val))))

foreign import javascript unsafe "(($1) => { return $1[\"name\"]; })"
        js_getName :: HTMLOutputElement -> IO JSString
-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/name MDN HTMLOutputElement.name documentation>
getName :: (MonadDOM m, FromJSString result) => HTMLOutputElement -> m result
getName self = liftDOM ((fromJSString <$> (js_getName (self))))

foreign import javascript unsafe "(($1) => { return $1[\"type\"]; })"
        js_getType :: HTMLOutputElement -> IO JSString
-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/type MDN HTMLOutputElement.type documentation>
getType :: (MonadDOM m, FromJSString result) => HTMLOutputElement -> m result
getType self = liftDOM ((fromJSString <$> (js_getType (self))))

foreign import javascript safe "(($1, $2) => { $1[\"defaultValue\"] = $2; })"
        js_setDefaultValue :: HTMLOutputElement -> JSString -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/defaultValue MDN HTMLOutputElement.defaultValue documentation>
setDefaultValue :: (MonadDOM m, ToJSString val) => HTMLOutputElement -> val -> m ()
setDefaultValue self val = liftDOM (void ((js_setDefaultValue (self) (toJSString val))))

foreign import javascript unsafe "(($1) => { return $1[\"defaultValue\"]; })"
        js_getDefaultValue :: HTMLOutputElement -> IO JSString
-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/defaultValue MDN HTMLOutputElement.defaultValue documentation>
getDefaultValue :: (MonadDOM m, FromJSString result) => HTMLOutputElement -> m result
getDefaultValue self = liftDOM ((fromJSString <$> (js_getDefaultValue (self))))

foreign import javascript safe "(($1, $2) => { $1[\"value\"] = $2; })"
        js_setValue :: HTMLOutputElement -> JSString -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/value MDN HTMLOutputElement.value documentation>
setValue :: (MonadDOM m, ToJSString val) => HTMLOutputElement -> val -> m ()
setValue self val = liftDOM (void ((js_setValue (self) (toJSString val))))

foreign import javascript unsafe "(($1) => { return $1[\"value\"]; })"
        js_getValue :: HTMLOutputElement -> IO JSString
-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/value MDN HTMLOutputElement.value documentation>
getValue :: (MonadDOM m, FromJSString result) => HTMLOutputElement -> m result
getValue self = liftDOM ((fromJSString <$> (js_getValue (self))))

foreign import javascript unsafe "(($1) => { return $1[\"willValidate\"]; })"
        js_getWillValidate :: HTMLOutputElement -> IO Bool
-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/willValidate MDN HTMLOutputElement.willValidate documentation>
getWillValidate :: (MonadDOM m) => HTMLOutputElement -> m Bool
getWillValidate self = liftDOM ((js_getWillValidate (self)))

foreign import javascript unsafe "(($1) => { return $1[\"validity\"]; })"
        js_getValidity :: HTMLOutputElement -> IO ValidityState
-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/validity MDN HTMLOutputElement.validity documentation>
getValidity :: (MonadDOM m) => HTMLOutputElement -> m ValidityState
getValidity self = liftDOM ((js_getValidity (self)))

foreign import javascript unsafe "(($1) => { return $1[\"validationMessage\"]; })"
        js_getValidationMessage :: HTMLOutputElement -> IO JSString
-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/validationMessage MDN HTMLOutputElement.validationMessage documentation>
getValidationMessage :: (MonadDOM m, FromJSString result) => HTMLOutputElement -> m result
getValidationMessage self = liftDOM ((fromJSString <$> (js_getValidationMessage (self))))

foreign import javascript unsafe "(($1) => { return $1[\"labels\"]; })"
        js_getLabels :: HTMLOutputElement -> IO NodeList
-- | <https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/labels MDN HTMLOutputElement.labels documentation>
getLabels :: (MonadDOM m) => HTMLOutputElement -> m NodeList
getLabels self = liftDOM ((js_getLabels (self)))