packages feed

jsaddle-dom-0.10.0.0: src/JSDOM/Generated/HTMLIFrameElement.hs

{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from html (webref). Do not edit.
module JSDOM.Generated.HTMLIFrameElement
       (getSVGDocument, getSVGDocument_, getSVGDocumentUnsafe, getSVGDocumentUnchecked, setSrc, getSrc, setSrcdoc, getSrcdoc, setName, getName, getSandbox, setAllow, getAllow, setAllowFullscreen, getAllowFullscreen, setWidth, getWidth, setHeight, getHeight, setReferrerPolicy, getReferrerPolicy, setLoading, getLoading, getContentDocument, getContentDocumentUnsafe, getContentDocumentUnchecked, getContentWindow, getContentWindowUnsafe, getContentWindowUnchecked, setAlign, getAlign, setScrolling, getScrolling, setFrameBorder, getFrameBorder, setLongDesc, getLongDesc, setMarginHeight, getMarginHeight, setMarginWidth, getMarginWidth, HTMLIFrameElement(..), gTypeHTMLIFrameElement)
       where
import Prelude ((.), (==), (>>=), (<$>), (++), Bool(..), Maybe(..), IO, Int, Word, Double, Float)
import qualified Prelude as P
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import Language.Javascript.JSaddle (JSM, JSVal, JSString, toJSVal, valToBool, valToNumber, js, jss, jsf, jsg, new, function, asyncFunction, jsUndefined, jsNull)
import JSDOM.Types
import qualified JSDOM.Types as Types
import JSDOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import JSDOM.Generated.Enums

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/getSVGDocument MDN HTMLIFrameElement.getSVGDocument documentation>
getSVGDocument :: (MonadDOM m) => HTMLIFrameElement -> m (Maybe Document)
getSVGDocument self = liftDOM (((self ^. jsf "getSVGDocument" ()) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/getSVGDocument MDN HTMLIFrameElement.getSVGDocument documentation>
getSVGDocument_ :: (MonadDOM m) => HTMLIFrameElement -> m ()
getSVGDocument_ self = liftDOM (void (self ^. jsf "getSVGDocument" ()))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/getSVGDocument MDN HTMLIFrameElement.getSVGDocument documentation>
getSVGDocumentUnsafe :: (MonadDOM m, HasCallStack) => HTMLIFrameElement -> m Document
getSVGDocumentUnsafe self = liftDOM ((((self ^. jsf "getSVGDocument" ()) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/getSVGDocument MDN HTMLIFrameElement.getSVGDocument documentation>
getSVGDocumentUnchecked :: (MonadDOM m) => HTMLIFrameElement -> m Document
getSVGDocumentUnchecked self = liftDOM (((self ^. jsf "getSVGDocument" ()) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/src MDN HTMLIFrameElement.src documentation>
setSrc :: (MonadDOM m, ToJSString val) => HTMLIFrameElement -> val -> m ()
setSrc self val = liftDOM (void (self ^. jss "src" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/src MDN HTMLIFrameElement.src documentation>
getSrc :: (MonadDOM m, FromJSString result) => HTMLIFrameElement -> m result
getSrc self = liftDOM (((self ^. js "src") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/srcdoc MDN HTMLIFrameElement.srcdoc documentation>
setSrcdoc :: (MonadDOM m, IsTrustedHTMLOrString val) => HTMLIFrameElement -> val -> m ()
setSrcdoc self val = liftDOM (void (self ^. jss "srcdoc" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/srcdoc MDN HTMLIFrameElement.srcdoc documentation>
getSrcdoc :: (MonadDOM m) => HTMLIFrameElement -> m TrustedHTMLOrString
getSrcdoc self = liftDOM (((self ^. js "srcdoc") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/name MDN HTMLIFrameElement.name documentation>
setName :: (MonadDOM m, ToJSString val) => HTMLIFrameElement -> val -> m ()
setName self val = liftDOM (void (self ^. jss "name" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/name MDN HTMLIFrameElement.name documentation>
getName :: (MonadDOM m, FromJSString result) => HTMLIFrameElement -> m result
getName self = liftDOM (((self ^. js "name") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/sandbox MDN HTMLIFrameElement.sandbox documentation>
getSandbox :: (MonadDOM m) => HTMLIFrameElement -> m DOMTokenList
getSandbox self = liftDOM (((self ^. js "sandbox") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/allow MDN HTMLIFrameElement.allow documentation>
setAllow :: (MonadDOM m, ToJSString val) => HTMLIFrameElement -> val -> m ()
setAllow self val = liftDOM (void (self ^. jss "allow" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/allow MDN HTMLIFrameElement.allow documentation>
getAllow :: (MonadDOM m, FromJSString result) => HTMLIFrameElement -> m result
getAllow self = liftDOM (((self ^. js "allow") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/allowFullscreen MDN HTMLIFrameElement.allowFullscreen documentation>
setAllowFullscreen :: (MonadDOM m) => HTMLIFrameElement -> Bool -> m ()
setAllowFullscreen self val = liftDOM (void (self ^. jss "allowFullscreen" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/allowFullscreen MDN HTMLIFrameElement.allowFullscreen documentation>
getAllowFullscreen :: (MonadDOM m) => HTMLIFrameElement -> m Bool
getAllowFullscreen self = liftDOM (((self ^. js "allowFullscreen") >>= valToBool))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/width MDN HTMLIFrameElement.width documentation>
setWidth :: (MonadDOM m, ToJSString val) => HTMLIFrameElement -> val -> m ()
setWidth self val = liftDOM (void (self ^. jss "width" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/width MDN HTMLIFrameElement.width documentation>
getWidth :: (MonadDOM m, FromJSString result) => HTMLIFrameElement -> m result
getWidth self = liftDOM (((self ^. js "width") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/height MDN HTMLIFrameElement.height documentation>
setHeight :: (MonadDOM m, ToJSString val) => HTMLIFrameElement -> val -> m ()
setHeight self val = liftDOM (void (self ^. jss "height" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/height MDN HTMLIFrameElement.height documentation>
getHeight :: (MonadDOM m, FromJSString result) => HTMLIFrameElement -> m result
getHeight self = liftDOM (((self ^. js "height") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/referrerPolicy MDN HTMLIFrameElement.referrerPolicy documentation>
setReferrerPolicy :: (MonadDOM m, ToJSString val) => HTMLIFrameElement -> val -> m ()
setReferrerPolicy self val = liftDOM (void (self ^. jss "referrerPolicy" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/referrerPolicy MDN HTMLIFrameElement.referrerPolicy documentation>
getReferrerPolicy :: (MonadDOM m, FromJSString result) => HTMLIFrameElement -> m result
getReferrerPolicy self = liftDOM (((self ^. js "referrerPolicy") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/loading MDN HTMLIFrameElement.loading documentation>
setLoading :: (MonadDOM m, ToJSString val) => HTMLIFrameElement -> val -> m ()
setLoading self val = liftDOM (void (self ^. jss "loading" (toJSVal val)))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/loading MDN HTMLIFrameElement.loading documentation>
getLoading :: (MonadDOM m, FromJSString result) => HTMLIFrameElement -> m result
getLoading self = liftDOM (((self ^. js "loading") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/contentDocument MDN HTMLIFrameElement.contentDocument documentation>
getContentDocument :: (MonadDOM m) => HTMLIFrameElement -> m (Maybe Document)
getContentDocument self = liftDOM (((self ^. js "contentDocument") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/contentDocument MDN HTMLIFrameElement.contentDocument documentation>
getContentDocumentUnsafe :: (MonadDOM m, HasCallStack) => HTMLIFrameElement -> m Document
getContentDocumentUnsafe self = liftDOM ((((self ^. js "contentDocument") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/contentDocument MDN HTMLIFrameElement.contentDocument documentation>
getContentDocumentUnchecked :: (MonadDOM m) => HTMLIFrameElement -> m Document
getContentDocumentUnchecked self = liftDOM (((self ^. js "contentDocument") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/contentWindow MDN HTMLIFrameElement.contentWindow documentation>
getContentWindow :: (MonadDOM m) => HTMLIFrameElement -> m (Maybe Window)
getContentWindow self = liftDOM (((self ^. js "contentWindow") >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/contentWindow MDN HTMLIFrameElement.contentWindow documentation>
getContentWindowUnsafe :: (MonadDOM m, HasCallStack) => HTMLIFrameElement -> m Window
getContentWindowUnsafe self = liftDOM ((((self ^. js "contentWindow") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/contentWindow MDN HTMLIFrameElement.contentWindow documentation>
getContentWindowUnchecked :: (MonadDOM m) => HTMLIFrameElement -> m Window
getContentWindowUnchecked self = liftDOM (((self ^. js "contentWindow") >>= fromJSValUnchecked))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-iframe-align HTMLIFrameElement.align specification>
setAlign :: (MonadDOM m, ToJSString val) => HTMLIFrameElement -> val -> m ()
setAlign self val = liftDOM (void (self ^. jss "align" (toJSVal val)))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-iframe-align HTMLIFrameElement.align specification>
getAlign :: (MonadDOM m, FromJSString result) => HTMLIFrameElement -> m result
getAlign self = liftDOM (((self ^. js "align") >>= fromJSValUnchecked))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-iframe-scrolling HTMLIFrameElement.scrolling specification>
setScrolling :: (MonadDOM m, ToJSString val) => HTMLIFrameElement -> val -> m ()
setScrolling self val = liftDOM (void (self ^. jss "scrolling" (toJSVal val)))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-iframe-scrolling HTMLIFrameElement.scrolling specification>
getScrolling :: (MonadDOM m, FromJSString result) => HTMLIFrameElement -> m result
getScrolling self = liftDOM (((self ^. js "scrolling") >>= fromJSValUnchecked))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-iframe-frameborder HTMLIFrameElement.frameBorder specification>
setFrameBorder :: (MonadDOM m, ToJSString val) => HTMLIFrameElement -> val -> m ()
setFrameBorder self val = liftDOM (void (self ^. jss "frameBorder" (toJSVal val)))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-iframe-frameborder HTMLIFrameElement.frameBorder specification>
getFrameBorder :: (MonadDOM m, FromJSString result) => HTMLIFrameElement -> m result
getFrameBorder self = liftDOM (((self ^. js "frameBorder") >>= fromJSValUnchecked))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-iframe-longdesc HTMLIFrameElement.longDesc specification>
setLongDesc :: (MonadDOM m, ToJSString val) => HTMLIFrameElement -> val -> m ()
setLongDesc self val = liftDOM (void (self ^. jss "longDesc" (toJSVal val)))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-iframe-longdesc HTMLIFrameElement.longDesc specification>
getLongDesc :: (MonadDOM m, FromJSString result) => HTMLIFrameElement -> m result
getLongDesc self = liftDOM (((self ^. js "longDesc") >>= fromJSValUnchecked))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-iframe-marginheight HTMLIFrameElement.marginHeight specification>
setMarginHeight :: (MonadDOM m, ToJSString val) => HTMLIFrameElement -> val -> m ()
setMarginHeight self val = liftDOM (void (self ^. jss "marginHeight" (toJSVal val)))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-iframe-marginheight HTMLIFrameElement.marginHeight specification>
getMarginHeight :: (MonadDOM m, FromJSString result) => HTMLIFrameElement -> m result
getMarginHeight self = liftDOM (((self ^. js "marginHeight") >>= fromJSValUnchecked))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-iframe-marginwidth HTMLIFrameElement.marginWidth specification>
setMarginWidth :: (MonadDOM m, ToJSString val) => HTMLIFrameElement -> val -> m ()
setMarginWidth self val = liftDOM (void (self ^. jss "marginWidth" (toJSVal val)))

-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-iframe-marginwidth HTMLIFrameElement.marginWidth specification>
getMarginWidth :: (MonadDOM m, FromJSString result) => HTMLIFrameElement -> m result
getMarginWidth self = liftDOM (((self ^. js "marginWidth") >>= fromJSValUnchecked))