packages feed

jsaddle-dom-0.10.0.0: src/JSDOM/Generated/HTMLTableSectionElement.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.HTMLTableSectionElement
       (deleteRow, insertRow, insertRow_, getRows, setAlign, getAlign, setCh, getCh, setChOff, getChOff, setVAlign, getVAlign, HTMLTableSectionElement(..), gTypeHTMLTableSectionElement)
       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/HTMLTableSectionElement/deleteRow MDN HTMLTableSectionElement.deleteRow documentation>
deleteRow :: (MonadDOM m) => HTMLTableSectionElement -> Int -> m ()
deleteRow self index = liftDOM (void (self ^. jsf "deleteRow" [toJSVal index]))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLTableSectionElement/insertRow MDN HTMLTableSectionElement.insertRow documentation>
insertRow :: (MonadDOM m) => HTMLTableSectionElement -> Maybe Int -> m HTMLTableRowElement
insertRow self index = liftDOM (((self ^. jsf "insertRow" [P.maybe (P.return jsUndefined) toJSVal index]) >>= fromJSValUnchecked))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLTableSectionElement/insertRow MDN HTMLTableSectionElement.insertRow documentation>
insertRow_ :: (MonadDOM m) => HTMLTableSectionElement -> Maybe Int -> m ()
insertRow_ self index = liftDOM (void (self ^. jsf "insertRow" [P.maybe (P.return jsUndefined) toJSVal index]))

-- | <https://developer.mozilla.org/docs/Web/API/HTMLTableSectionElement/rows MDN HTMLTableSectionElement.rows documentation>
getRows :: (MonadDOM m) => HTMLTableSectionElement -> m HTMLCollection
getRows self = liftDOM (((self ^. js "rows") >>= fromJSValUnchecked))

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

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

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

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

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

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

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

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