{-# LANGUAGE PatternSynonyms #-} module Language.Javascript.JSaddle.DOM.Generated.HTMLTableRowElement (insertCell, deleteCell, getRowIndex, getSectionRowIndex, getCells, setAlign, getAlign, setBgColor, getBgColor, setCh, getCh, setChOff, getChOff, setVAlign, getVAlign, HTMLTableRowElement, castToHTMLTableRowElement, gTypeHTMLTableRowElement) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, Ord, Maybe(..)) import Data.Typeable (Typeable) import Language.Javascript.JSaddle (JSM(..), JSVal(..), JSString, strictEqual, toJSVal, valToStr, valToNumber, valToBool, js, jss, jsf, jsg, function, new, array) import Data.Int (Int64) import Data.Word (Word, Word64) import Language.Javascript.JSaddle.DOM.Types import Control.Applicative ((<$>)) import Control.Monad (void) import Control.Lens.Operators ((^.)) import Language.Javascript.JSaddle.DOM.EventTargetClosures (EventName, unsafeEventName) import Language.Javascript.JSaddle.DOM.Enums -- | insertCell :: (MonadDOM m) => HTMLTableRowElement -> Int -> m (Maybe HTMLElement) insertCell self index = liftDOM ((self ^. jsf "insertCell" [toJSVal index]) >>= fromJSVal) -- | deleteCell :: (MonadDOM m) => HTMLTableRowElement -> Int -> m () deleteCell self index = liftDOM (void (self ^. jsf "deleteCell" [toJSVal index])) -- | getRowIndex :: (MonadDOM m) => HTMLTableRowElement -> m Int getRowIndex self = liftDOM (round <$> ((self ^. js "rowIndex") >>= valToNumber)) -- | getSectionRowIndex :: (MonadDOM m) => HTMLTableRowElement -> m Int getSectionRowIndex self = liftDOM (round <$> ((self ^. js "sectionRowIndex") >>= valToNumber)) -- | getCells :: (MonadDOM m) => HTMLTableRowElement -> m (Maybe HTMLCollection) getCells self = liftDOM ((self ^. js "cells") >>= fromJSVal) -- | setAlign :: (MonadDOM m, ToJSString val) => HTMLTableRowElement -> val -> m () setAlign self val = liftDOM (self ^. jss "align" (toJSVal val)) -- | getAlign :: (MonadDOM m, FromJSString result) => HTMLTableRowElement -> m result getAlign self = liftDOM ((self ^. js "align") >>= fromJSValUnchecked) -- | setBgColor :: (MonadDOM m, ToJSString val) => HTMLTableRowElement -> val -> m () setBgColor self val = liftDOM (self ^. jss "bgColor" (toJSVal val)) -- | getBgColor :: (MonadDOM m, FromJSString result) => HTMLTableRowElement -> m result getBgColor self = liftDOM ((self ^. js "bgColor") >>= fromJSValUnchecked) -- | setCh :: (MonadDOM m, ToJSString val) => HTMLTableRowElement -> val -> m () setCh self val = liftDOM (self ^. jss "ch" (toJSVal val)) -- | getCh :: (MonadDOM m, FromJSString result) => HTMLTableRowElement -> m result getCh self = liftDOM ((self ^. js "ch") >>= fromJSValUnchecked) -- | setChOff :: (MonadDOM m, ToJSString val) => HTMLTableRowElement -> val -> m () setChOff self val = liftDOM (self ^. jss "chOff" (toJSVal val)) -- | getChOff :: (MonadDOM m, FromJSString result) => HTMLTableRowElement -> m result getChOff self = liftDOM ((self ^. js "chOff") >>= fromJSValUnchecked) -- | setVAlign :: (MonadDOM m, ToJSString val) => HTMLTableRowElement -> val -> m () setVAlign self val = liftDOM (self ^. jss "vAlign" (toJSVal val)) -- | getVAlign :: (MonadDOM m, FromJSString result) => HTMLTableRowElement -> m result getVAlign self = liftDOM ((self ^. js "vAlign") >>= fromJSValUnchecked)