{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.DOMImplementation
(createDocumentType, createDocumentType_, createDocument,
createDocument_, createHTMLDocument, createHTMLDocument_,
hasFeature, hasFeature_, DOMImplementation(..),
gTypeDOMImplementation)
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
createDocumentType ::
(MonadDOM m, ToJSString qualifiedName, ToJSString publicId,
ToJSString systemId) =>
DOMImplementation ->
qualifiedName -> publicId -> systemId -> m DocumentType
createDocumentType self qualifiedName publicId systemId
= liftDOM
((self ^. jsf "createDocumentType"
[toJSVal qualifiedName, toJSVal publicId, toJSVal systemId])
>>= fromJSValUnchecked)
createDocumentType_ ::
(MonadDOM m, ToJSString qualifiedName, ToJSString publicId,
ToJSString systemId) =>
DOMImplementation -> qualifiedName -> publicId -> systemId -> m ()
createDocumentType_ self qualifiedName publicId systemId
= liftDOM
(void
(self ^. jsf "createDocumentType"
[toJSVal qualifiedName, toJSVal publicId, toJSVal systemId]))
createDocument ::
(MonadDOM m, ToJSString namespaceURI, ToJSString qualifiedName) =>
DOMImplementation ->
Maybe namespaceURI ->
qualifiedName -> Maybe DocumentType -> m XMLDocument
createDocument self namespaceURI qualifiedName doctype
= liftDOM
((self ^. jsf "createDocument"
[toJSVal namespaceURI, toJSVal qualifiedName, toJSVal doctype])
>>= fromJSValUnchecked)
createDocument_ ::
(MonadDOM m, ToJSString namespaceURI, ToJSString qualifiedName) =>
DOMImplementation ->
Maybe namespaceURI -> qualifiedName -> Maybe DocumentType -> m ()
createDocument_ self namespaceURI qualifiedName doctype
= liftDOM
(void
(self ^. jsf "createDocument"
[toJSVal namespaceURI, toJSVal qualifiedName, toJSVal doctype]))
createHTMLDocument ::
(MonadDOM m, ToJSString title) =>
DOMImplementation -> Maybe title -> m HTMLDocument
createHTMLDocument self title
= liftDOM
((self ^. jsf "createHTMLDocument" [toJSVal title]) >>=
fromJSValUnchecked)
createHTMLDocument_ ::
(MonadDOM m, ToJSString title) =>
DOMImplementation -> Maybe title -> m ()
createHTMLDocument_ self title
= liftDOM (void (self ^. jsf "createHTMLDocument" [toJSVal title]))
hasFeature :: (MonadDOM m) => DOMImplementation -> m Bool
hasFeature self
= liftDOM ((self ^. jsf "hasFeature" ()) >>= valToBool)
hasFeature_ :: (MonadDOM m) => DOMImplementation -> m ()
hasFeature_ self = liftDOM (void (self ^. jsf "hasFeature" ()))