{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.HTMLDocument
(open, close, write, writeln, clear, captureEvents, releaseEvents,
getAll, setBgColor, getBgColor, setFgColor, getFgColor,
setAlinkColor, getAlinkColor, setLinkColor, getLinkColor,
setVlinkColor, getVlinkColor, HTMLDocument(..), gTypeHTMLDocument)
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, unsafeEventNameAsync)
import JSDOM.Enums
open :: (MonadDOM m) => HTMLDocument -> m ()
open self = liftDOM (void (self ^. jsf "open" ()))
close :: (MonadDOM m) => HTMLDocument -> m ()
close self = liftDOM (void (self ^. jsf "close" ()))
write ::
(MonadDOM m, ToJSString text) => HTMLDocument -> Maybe text -> m ()
write self text
= liftDOM (void (self ^. jsf "write" [toJSVal text]))
writeln ::
(MonadDOM m, ToJSString text) => HTMLDocument -> Maybe text -> m ()
writeln self text
= liftDOM (void (self ^. jsf "writeln" [toJSVal text]))
clear :: (MonadDOM m) => HTMLDocument -> m ()
clear self = liftDOM (void (self ^. jsf "clear" ()))
captureEvents :: (MonadDOM m) => HTMLDocument -> m ()
captureEvents self
= liftDOM (void (self ^. jsf "captureEvents" ()))
releaseEvents :: (MonadDOM m) => HTMLDocument -> m ()
releaseEvents self
= liftDOM (void (self ^. jsf "releaseEvents" ()))
getAll :: (MonadDOM m) => HTMLDocument -> m HTMLAllCollection
getAll self = liftDOM ((self ^. js "all") >>= fromJSValUnchecked)
setBgColor ::
(MonadDOM m, ToJSString val) => HTMLDocument -> val -> m ()
setBgColor self val = liftDOM (self ^. jss "bgColor" (toJSVal val))
getBgColor ::
(MonadDOM m, FromJSString result) => HTMLDocument -> m result
getBgColor self
= liftDOM ((self ^. js "bgColor") >>= fromJSValUnchecked)
setFgColor ::
(MonadDOM m, ToJSString val) => HTMLDocument -> val -> m ()
setFgColor self val = liftDOM (self ^. jss "fgColor" (toJSVal val))
getFgColor ::
(MonadDOM m, FromJSString result) => HTMLDocument -> m result
getFgColor self
= liftDOM ((self ^. js "fgColor") >>= fromJSValUnchecked)
setAlinkColor ::
(MonadDOM m, ToJSString val) => HTMLDocument -> val -> m ()
setAlinkColor self val
= liftDOM (self ^. jss "alinkColor" (toJSVal val))
getAlinkColor ::
(MonadDOM m, FromJSString result) => HTMLDocument -> m result
getAlinkColor self
= liftDOM ((self ^. js "alinkColor") >>= fromJSValUnchecked)
setLinkColor ::
(MonadDOM m, ToJSString val) => HTMLDocument -> val -> m ()
setLinkColor self val
= liftDOM (self ^. jss "linkColor" (toJSVal val))
getLinkColor ::
(MonadDOM m, FromJSString result) => HTMLDocument -> m result
getLinkColor self
= liftDOM ((self ^. js "linkColor") >>= fromJSValUnchecked)
setVlinkColor ::
(MonadDOM m, ToJSString val) => HTMLDocument -> val -> m ()
setVlinkColor self val
= liftDOM (self ^. jss "vlinkColor" (toJSVal val))
getVlinkColor ::
(MonadDOM m, FromJSString result) => HTMLDocument -> m result
getVlinkColor self
= liftDOM ((self ^. js "vlinkColor") >>= fromJSValUnchecked)