{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.HTMLScriptElement
(setText, getText, setHtmlFor, getHtmlFor, setEvent, getEvent,
setCharset, getCharset, setAsync, getAsync, setDefer, getDefer,
setSrc, getSrc, setType, getType, setCrossOrigin, getCrossOrigin,
getCrossOriginUnsafe, getCrossOriginUnchecked, setNonce, getNonce,
setNoModule, getNoModule, setIntegrity, getIntegrity,
HTMLScriptElement(..), gTypeHTMLScriptElement)
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
setText ::
(MonadDOM m, ToJSString val) => HTMLScriptElement -> val -> m ()
setText self val = liftDOM (self ^. jss "text" (toJSVal val))
getText ::
(MonadDOM m, FromJSString result) => HTMLScriptElement -> m result
getText self = liftDOM ((self ^. js "text") >>= fromJSValUnchecked)
setHtmlFor ::
(MonadDOM m, ToJSString val) => HTMLScriptElement -> val -> m ()
setHtmlFor self val = liftDOM (self ^. jss "htmlFor" (toJSVal val))
getHtmlFor ::
(MonadDOM m, FromJSString result) => HTMLScriptElement -> m result
getHtmlFor self
= liftDOM ((self ^. js "htmlFor") >>= fromJSValUnchecked)
setEvent ::
(MonadDOM m, ToJSString val) => HTMLScriptElement -> val -> m ()
setEvent self val = liftDOM (self ^. jss "event" (toJSVal val))
getEvent ::
(MonadDOM m, FromJSString result) => HTMLScriptElement -> m result
getEvent self
= liftDOM ((self ^. js "event") >>= fromJSValUnchecked)
setCharset ::
(MonadDOM m, ToJSString val) => HTMLScriptElement -> val -> m ()
setCharset self val = liftDOM (self ^. jss "charset" (toJSVal val))
getCharset ::
(MonadDOM m, FromJSString result) => HTMLScriptElement -> m result
getCharset self
= liftDOM ((self ^. js "charset") >>= fromJSValUnchecked)
setAsync :: (MonadDOM m) => HTMLScriptElement -> Bool -> m ()
setAsync self val = liftDOM (self ^. jss "async" (toJSVal val))
getAsync :: (MonadDOM m) => HTMLScriptElement -> m Bool
getAsync self = liftDOM ((self ^. js "async") >>= valToBool)
setDefer :: (MonadDOM m) => HTMLScriptElement -> Bool -> m ()
setDefer self val = liftDOM (self ^. jss "defer" (toJSVal val))
getDefer :: (MonadDOM m) => HTMLScriptElement -> m Bool
getDefer self = liftDOM ((self ^. js "defer") >>= valToBool)
setSrc ::
(MonadDOM m, ToJSString val) => HTMLScriptElement -> val -> m ()
setSrc self val = liftDOM (self ^. jss "src" (toJSVal val))
getSrc ::
(MonadDOM m, FromJSString result) => HTMLScriptElement -> m result
getSrc self = liftDOM ((self ^. js "src") >>= fromJSValUnchecked)
setType ::
(MonadDOM m, ToJSString val) => HTMLScriptElement -> val -> m ()
setType self val = liftDOM (self ^. jss "type" (toJSVal val))
getType ::
(MonadDOM m, FromJSString result) => HTMLScriptElement -> m result
getType self = liftDOM ((self ^. js "type") >>= fromJSValUnchecked)
setCrossOrigin ::
(MonadDOM m, ToJSString val) =>
HTMLScriptElement -> Maybe val -> m ()
setCrossOrigin self val
= liftDOM (self ^. jss "crossOrigin" (toJSVal val))
getCrossOrigin ::
(MonadDOM m, FromJSString result) =>
HTMLScriptElement -> m (Maybe result)
getCrossOrigin self
= liftDOM ((self ^. js "crossOrigin") >>= fromMaybeJSString)
getCrossOriginUnsafe ::
(MonadDOM m, HasCallStack, FromJSString result) =>
HTMLScriptElement -> m result
getCrossOriginUnsafe self
= liftDOM
(((self ^. js "crossOrigin") >>= fromMaybeJSString) >>=
maybe (Prelude.error "Nothing to return") return)
getCrossOriginUnchecked ::
(MonadDOM m, FromJSString result) => HTMLScriptElement -> m result
getCrossOriginUnchecked self
= liftDOM ((self ^. js "crossOrigin") >>= fromJSValUnchecked)
setNonce ::
(MonadDOM m, ToJSString val) => HTMLScriptElement -> val -> m ()
setNonce self val = liftDOM (self ^. jss "nonce" (toJSVal val))
getNonce ::
(MonadDOM m, FromJSString result) => HTMLScriptElement -> m result
getNonce self
= liftDOM ((self ^. js "nonce") >>= fromJSValUnchecked)
setNoModule :: (MonadDOM m) => HTMLScriptElement -> Bool -> m ()
setNoModule self val
= liftDOM (self ^. jss "noModule" (toJSVal val))
getNoModule :: (MonadDOM m) => HTMLScriptElement -> m Bool
getNoModule self = liftDOM ((self ^. js "noModule") >>= valToBool)
setIntegrity ::
(MonadDOM m, ToJSString val) => HTMLScriptElement -> val -> m ()
setIntegrity self val
= liftDOM (self ^. jss "integrity" (toJSVal val))
getIntegrity ::
(MonadDOM m, FromJSString result) => HTMLScriptElement -> m result
getIntegrity self
= liftDOM ((self ^. js "integrity") >>= fromJSValUnchecked)