packages feed

ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/HTMLDialogElement.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.HTMLDialogElement
       (js_close, js_requestClose, js_show, js_showModal, js_setOpen, js_getOpen, js_setReturnValue, js_getReturnValue, js_setClosedBy, js_getClosedBy, close, requestClose, show, showModal, setOpen, getOpen, setReturnValue, getReturnValue, setClosedBy, getClosedBy, HTMLDialogElement(..), gTypeHTMLDialogElement)
       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, $2) => { return $1[\"close\"]($2); })"
        js_close :: HTMLDialogElement -> (Optional JSString) -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/HTMLDialogElement/close MDN HTMLDialogElement.close documentation>
close :: (MonadDOM m, ToJSString returnValue) => HTMLDialogElement -> Maybe returnValue -> m ()
close self returnValue = liftDOM (void ((js_close (self) (toOptionalJSString returnValue))))

foreign import javascript safe "(($1, $2) => { return $1[\"requestClose\"]($2); })"
        js_requestClose :: HTMLDialogElement -> (Optional JSString) -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/HTMLDialogElement/requestClose MDN HTMLDialogElement.requestClose documentation>
requestClose :: (MonadDOM m, ToJSString returnValue) => HTMLDialogElement -> Maybe returnValue -> m ()
requestClose self returnValue = liftDOM (void ((js_requestClose (self) (toOptionalJSString returnValue))))

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

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

foreign import javascript safe "(($1, $2) => { $1[\"open\"] = $2; })"
        js_setOpen :: HTMLDialogElement -> Bool -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/HTMLDialogElement/open MDN HTMLDialogElement.open documentation>
setOpen :: (MonadDOM m) => HTMLDialogElement -> Bool -> m ()
setOpen self val = liftDOM (void ((js_setOpen (self) (val))))

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

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

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

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

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