{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.SVGElement
(getPresentationAttribute, getPresentationAttribute_, focus, blur,
getOwnerSVGElement, getViewportElement, setXmllang, getXmllang,
setXmlspace, getXmlspace, getClassName, setTabIndex, getTabIndex,
getDataset, SVGElement(..), gTypeSVGElement, IsSVGElement,
toSVGElement)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, Ord, Maybe(..))
import qualified Prelude (error)
import Data.Typeable (Typeable)
import Data.Traversable (mapM)
import Language.Javascript.JSaddle (JSM(..), JSVal(..), JSString, strictEqual, toJSVal, valToStr, valToNumber, valToBool, js, jss, jsf, jsg, function, asyncFunction, new, array, jsUndefined, (!), (!!))
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, unsafeEventNameAsync)
import JSDOM.Enums
getPresentationAttribute ::
(MonadDOM m, IsSVGElement self, ToJSString name) =>
self -> Maybe name -> m CSSValue
getPresentationAttribute :: forall (m :: * -> *) self name.
(MonadDOM m, IsSVGElement self, ToJSString name) =>
self -> Maybe name -> m CSSValue
getPresentationAttribute self
self Maybe name
name
= DOM CSSValue -> m CSSValue
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
(((self -> SVGElement
forall o. IsSVGElement o => o -> SVGElement
toSVGElement self
self) SVGElement
-> Getting (JSM JSVal) SVGElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"getPresentationAttribute"
[Maybe name -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe name
name])
JSM JSVal -> (JSVal -> DOM CSSValue) -> DOM CSSValue
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM CSSValue
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)
getPresentationAttribute_ ::
(MonadDOM m, IsSVGElement self, ToJSString name) =>
self -> Maybe name -> m ()
getPresentationAttribute_ :: forall (m :: * -> *) self name.
(MonadDOM m, IsSVGElement self, ToJSString name) =>
self -> Maybe name -> m ()
getPresentationAttribute_ self
self Maybe name
name
= DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
(JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
((self -> SVGElement
forall o. IsSVGElement o => o -> SVGElement
toSVGElement self
self) SVGElement
-> Getting (JSM JSVal) SVGElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"getPresentationAttribute"
[Maybe name -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe name
name]))
focus :: (MonadDOM m, IsSVGElement self) => self -> m ()
focus :: forall (m :: * -> *) self.
(MonadDOM m, IsSVGElement self) =>
self -> m ()
focus self
self = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void ((self -> SVGElement
forall o. IsSVGElement o => o -> SVGElement
toSVGElement self
self) SVGElement
-> Getting (JSM JSVal) SVGElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"focus" ()))
blur :: (MonadDOM m, IsSVGElement self) => self -> m ()
blur :: forall (m :: * -> *) self.
(MonadDOM m, IsSVGElement self) =>
self -> m ()
blur self
self = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void ((self -> SVGElement
forall o. IsSVGElement o => o -> SVGElement
toSVGElement self
self) SVGElement
-> Getting (JSM JSVal) SVGElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"blur" ()))
getOwnerSVGElement ::
(MonadDOM m, IsSVGElement self) => self -> m SVGSVGElement
getOwnerSVGElement :: forall (m :: * -> *) self.
(MonadDOM m, IsSVGElement self) =>
self -> m SVGSVGElement
getOwnerSVGElement self
self
= DOM SVGSVGElement -> m SVGSVGElement
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
(((self -> SVGElement
forall o. IsSVGElement o => o -> SVGElement
toSVGElement self
self) SVGElement
-> Getting (JSM JSVal) SVGElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter SVGElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"ownerSVGElement") JSM JSVal -> (JSVal -> DOM SVGSVGElement) -> DOM SVGSVGElement
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>=
JSVal -> DOM SVGSVGElement
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)
getViewportElement ::
(MonadDOM m, IsSVGElement self) => self -> m SVGElement
getViewportElement :: forall (m :: * -> *) self.
(MonadDOM m, IsSVGElement self) =>
self -> m SVGElement
getViewportElement self
self
= DOM SVGElement -> m SVGElement
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
(((self -> SVGElement
forall o. IsSVGElement o => o -> SVGElement
toSVGElement self
self) SVGElement
-> Getting (JSM JSVal) SVGElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter SVGElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"viewportElement") JSM JSVal -> (JSVal -> DOM SVGElement) -> DOM SVGElement
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>=
JSVal -> DOM SVGElement
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)
setXmllang ::
(MonadDOM m, IsSVGElement self, ToJSString val) =>
self -> val -> m ()
setXmllang :: forall (m :: * -> *) self val.
(MonadDOM m, IsSVGElement self, ToJSString val) =>
self -> val -> m ()
setXmllang self
self val
val
= DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((self -> SVGElement
forall o. IsSVGElement o => o -> SVGElement
toSVGElement self
self) SVGElement -> Getting (DOM ()) SVGElement (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"xmllang" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))
getXmllang ::
(MonadDOM m, IsSVGElement self, FromJSString result) =>
self -> m result
getXmllang :: forall (m :: * -> *) self result.
(MonadDOM m, IsSVGElement self, FromJSString result) =>
self -> m result
getXmllang self
self
= DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
(((self -> SVGElement
forall o. IsSVGElement o => o -> SVGElement
toSVGElement self
self) SVGElement
-> Getting (JSM JSVal) SVGElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter SVGElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"xmllang") JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)
setXmlspace ::
(MonadDOM m, IsSVGElement self, ToJSString val) =>
self -> val -> m ()
setXmlspace :: forall (m :: * -> *) self val.
(MonadDOM m, IsSVGElement self, ToJSString val) =>
self -> val -> m ()
setXmlspace self
self val
val
= DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((self -> SVGElement
forall o. IsSVGElement o => o -> SVGElement
toSVGElement self
self) SVGElement -> Getting (DOM ()) SVGElement (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"xmlspace" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))
getXmlspace ::
(MonadDOM m, IsSVGElement self, FromJSString result) =>
self -> m result
getXmlspace :: forall (m :: * -> *) self result.
(MonadDOM m, IsSVGElement self, FromJSString result) =>
self -> m result
getXmlspace self
self
= DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
(((self -> SVGElement
forall o. IsSVGElement o => o -> SVGElement
toSVGElement self
self) SVGElement
-> Getting (JSM JSVal) SVGElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter SVGElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"xmlspace") JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)
getClassName ::
(MonadDOM m, IsSVGElement self) => self -> m SVGAnimatedString
getClassName :: forall (m :: * -> *) self.
(MonadDOM m, IsSVGElement self) =>
self -> m SVGAnimatedString
getClassName self
self
= DOM SVGAnimatedString -> m SVGAnimatedString
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
(((self -> SVGElement
forall o. IsSVGElement o => o -> SVGElement
toSVGElement self
self) SVGElement
-> Getting (JSM JSVal) SVGElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter SVGElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"className") JSM JSVal
-> (JSVal -> DOM SVGAnimatedString) -> DOM SVGAnimatedString
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM SVGAnimatedString
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)
setTabIndex ::
(MonadDOM m, IsSVGElement self) => self -> Int -> m ()
setTabIndex :: forall (m :: * -> *) self.
(MonadDOM m, IsSVGElement self) =>
self -> Int -> m ()
setTabIndex self
self Int
val
= DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((self -> SVGElement
forall o. IsSVGElement o => o -> SVGElement
toSVGElement self
self) SVGElement -> Getting (DOM ()) SVGElement (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"tabIndex" (Int -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Int
val))
getTabIndex :: (MonadDOM m, IsSVGElement self) => self -> m Int
getTabIndex :: forall (m :: * -> *) self.
(MonadDOM m, IsSVGElement self) =>
self -> m Int
getTabIndex self
self
= DOM Int -> m Int
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
(Double -> Int
forall b. Integral b => Double -> b
forall a b. (RealFrac a, Integral b) => a -> b
round (Double -> Int) -> JSM Double -> DOM Int
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
(((self -> SVGElement
forall o. IsSVGElement o => o -> SVGElement
toSVGElement self
self) SVGElement
-> Getting (JSM JSVal) SVGElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter SVGElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"tabIndex") JSM JSVal -> (JSVal -> JSM Double) -> JSM Double
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> JSM Double
forall value. ToJSVal value => value -> JSM Double
valToNumber))
getDataset ::
(MonadDOM m, IsSVGElement self) => self -> m DOMStringMap
getDataset :: forall (m :: * -> *) self.
(MonadDOM m, IsSVGElement self) =>
self -> m DOMStringMap
getDataset self
self
= DOM DOMStringMap -> m DOMStringMap
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
(((self -> SVGElement
forall o. IsSVGElement o => o -> SVGElement
toSVGElement self
self) SVGElement
-> Getting (JSM JSVal) SVGElement (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter SVGElement (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"dataset") JSM JSVal -> (JSVal -> DOM DOMStringMap) -> DOM DOMStringMap
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM DOMStringMap
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)