jsaddle-dom-0.10.0.0: src/JSDOM/Generated/HTMLFrameElement.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.HTMLFrameElement
(setName, getName, setScrolling, getScrolling, setSrc, getSrc, setFrameBorder, getFrameBorder, setLongDesc, getLongDesc, setNoResize, getNoResize, getContentDocument, getContentDocumentUnsafe, getContentDocumentUnchecked, getContentWindow, getContentWindowUnsafe, getContentWindowUnchecked, setMarginHeight, getMarginHeight, setMarginWidth, getMarginWidth, HTMLFrameElement(..), gTypeHTMLFrameElement)
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://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-name HTMLFrameElement.name specification>
setName :: (MonadDOM m, ToJSString val) => HTMLFrameElement -> val -> m ()
setName self val = liftDOM (void (self ^. jss "name" (toJSVal val)))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-name HTMLFrameElement.name specification>
getName :: (MonadDOM m, FromJSString result) => HTMLFrameElement -> m result
getName self = liftDOM (((self ^. js "name") >>= fromJSValUnchecked))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-scrolling HTMLFrameElement.scrolling specification>
setScrolling :: (MonadDOM m, ToJSString val) => HTMLFrameElement -> val -> m ()
setScrolling self val = liftDOM (void (self ^. jss "scrolling" (toJSVal val)))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-scrolling HTMLFrameElement.scrolling specification>
getScrolling :: (MonadDOM m, FromJSString result) => HTMLFrameElement -> m result
getScrolling self = liftDOM (((self ^. js "scrolling") >>= fromJSValUnchecked))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-src HTMLFrameElement.src specification>
setSrc :: (MonadDOM m, ToJSString val) => HTMLFrameElement -> val -> m ()
setSrc self val = liftDOM (void (self ^. jss "src" (toJSVal val)))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-src HTMLFrameElement.src specification>
getSrc :: (MonadDOM m, FromJSString result) => HTMLFrameElement -> m result
getSrc self = liftDOM (((self ^. js "src") >>= fromJSValUnchecked))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-frameborder HTMLFrameElement.frameBorder specification>
setFrameBorder :: (MonadDOM m, ToJSString val) => HTMLFrameElement -> val -> m ()
setFrameBorder self val = liftDOM (void (self ^. jss "frameBorder" (toJSVal val)))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-frameborder HTMLFrameElement.frameBorder specification>
getFrameBorder :: (MonadDOM m, FromJSString result) => HTMLFrameElement -> m result
getFrameBorder self = liftDOM (((self ^. js "frameBorder") >>= fromJSValUnchecked))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-longdesc HTMLFrameElement.longDesc specification>
setLongDesc :: (MonadDOM m, ToJSString val) => HTMLFrameElement -> val -> m ()
setLongDesc self val = liftDOM (void (self ^. jss "longDesc" (toJSVal val)))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-longdesc HTMLFrameElement.longDesc specification>
getLongDesc :: (MonadDOM m, FromJSString result) => HTMLFrameElement -> m result
getLongDesc self = liftDOM (((self ^. js "longDesc") >>= fromJSValUnchecked))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-noresize HTMLFrameElement.noResize specification>
setNoResize :: (MonadDOM m) => HTMLFrameElement -> Bool -> m ()
setNoResize self val = liftDOM (void (self ^. jss "noResize" (toJSVal val)))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-noresize HTMLFrameElement.noResize specification>
getNoResize :: (MonadDOM m) => HTMLFrameElement -> m Bool
getNoResize self = liftDOM (((self ^. js "noResize") >>= valToBool))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-contentdocument HTMLFrameElement.contentDocument specification>
getContentDocument :: (MonadDOM m) => HTMLFrameElement -> m (Maybe Document)
getContentDocument self = liftDOM (((self ^. js "contentDocument") >>= fromJSValUnchecked))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-contentdocument HTMLFrameElement.contentDocument specification>
getContentDocumentUnsafe :: (MonadDOM m, HasCallStack) => HTMLFrameElement -> m Document
getContentDocumentUnsafe self = liftDOM ((((self ^. js "contentDocument") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-contentdocument HTMLFrameElement.contentDocument specification>
getContentDocumentUnchecked :: (MonadDOM m) => HTMLFrameElement -> m Document
getContentDocumentUnchecked self = liftDOM (((self ^. js "contentDocument") >>= fromJSValUnchecked))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-contentwindow HTMLFrameElement.contentWindow specification>
getContentWindow :: (MonadDOM m) => HTMLFrameElement -> m (Maybe Window)
getContentWindow self = liftDOM (((self ^. js "contentWindow") >>= fromJSValUnchecked))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-contentwindow HTMLFrameElement.contentWindow specification>
getContentWindowUnsafe :: (MonadDOM m, HasCallStack) => HTMLFrameElement -> m Window
getContentWindowUnsafe self = liftDOM ((((self ^. js "contentWindow") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-contentwindow HTMLFrameElement.contentWindow specification>
getContentWindowUnchecked :: (MonadDOM m) => HTMLFrameElement -> m Window
getContentWindowUnchecked self = liftDOM (((self ^. js "contentWindow") >>= fromJSValUnchecked))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-marginheight HTMLFrameElement.marginHeight specification>
setMarginHeight :: (MonadDOM m, ToJSString val) => HTMLFrameElement -> val -> m ()
setMarginHeight self val = liftDOM (void (self ^. jss "marginHeight" (toJSVal val)))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-marginheight HTMLFrameElement.marginHeight specification>
getMarginHeight :: (MonadDOM m, FromJSString result) => HTMLFrameElement -> m result
getMarginHeight self = liftDOM (((self ^. js "marginHeight") >>= fromJSValUnchecked))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-marginwidth HTMLFrameElement.marginWidth specification>
setMarginWidth :: (MonadDOM m, ToJSString val) => HTMLFrameElement -> val -> m ()
setMarginWidth self val = liftDOM (void (self ^. jss "marginWidth" (toJSVal val)))
-- | <https://html.spec.whatwg.org/multipage/obsolete.html#dom-frame-marginwidth HTMLFrameElement.marginWidth specification>
getMarginWidth :: (MonadDOM m, FromJSString result) => HTMLFrameElement -> m result
getMarginWidth self = liftDOM (((self ^. js "marginWidth") >>= fromJSValUnchecked))