module JSDOM.Generated.SVGLengthList
(clear, initialize, getItem, insertItemBefore, replaceItem,
removeItem, appendItem, getNumberOfItems, SVGLengthList,
castToSVGLengthList, gTypeSVGLengthList)
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 JSDOM.Types
import Control.Applicative ((<$>))
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import JSDOM.EventTargetClosures (EventName, unsafeEventName)
import JSDOM.Enums
clear :: (MonadDOM m) => SVGLengthList -> m ()
clear self = liftDOM (void (self ^. js "clear"))
initialize ::
(MonadDOM m) =>
SVGLengthList -> Maybe SVGLength -> m (Maybe SVGLength)
initialize self item
= liftDOM ((self ^. jsf "initialize" [toJSVal item]) >>= fromJSVal)
getItem ::
(MonadDOM m) => SVGLengthList -> Word -> m (Maybe SVGLength)
getItem self index
= liftDOM ((self ^. jsf "getItem" [toJSVal index]) >>= fromJSVal)
insertItemBefore ::
(MonadDOM m) =>
SVGLengthList -> Maybe SVGLength -> Word -> m (Maybe SVGLength)
insertItemBefore self item index
= liftDOM
((self ^. jsf "insertItemBefore" [toJSVal item, toJSVal index]) >>=
fromJSVal)
replaceItem ::
(MonadDOM m) =>
SVGLengthList -> Maybe SVGLength -> Word -> m (Maybe SVGLength)
replaceItem self item index
= liftDOM
((self ^. jsf "replaceItem" [toJSVal item, toJSVal index]) >>=
fromJSVal)
removeItem ::
(MonadDOM m) => SVGLengthList -> Word -> m (Maybe SVGLength)
removeItem self index
= liftDOM
((self ^. jsf "removeItem" [toJSVal index]) >>= fromJSVal)
appendItem ::
(MonadDOM m) =>
SVGLengthList -> Maybe SVGLength -> m (Maybe SVGLength)
appendItem self item
= liftDOM ((self ^. jsf "appendItem" [toJSVal item]) >>= fromJSVal)
getNumberOfItems :: (MonadDOM m) => SVGLengthList -> m Word
getNumberOfItems self
= liftDOM
(round <$> ((self ^. js "numberOfItems") >>= valToNumber))