ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/HTMLOrSVGOrMathMLElement.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from html (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.HTMLOrSVGOrMathMLElement
(js_blur, js_focus, js_focus', js_getDataset, js_setNonce, js_getNonce, js_setAutofocus, js_getAutofocus, js_setTabIndex, js_getTabIndex, blur, focus, focus', getDataset, setNonce, getNonce, setAutofocus, getAutofocus, setTabIndex, getTabIndex, HTMLOrSVGOrMathMLElement(..), gTypeHTMLOrSVGOrMathMLElement, IsHTMLOrSVGOrMathMLElement, toHTMLOrSVGOrMathMLElement)
where
import Prelude ((.), (==), (>>=), (<$>), (++), Bool(..), Maybe(..), IO, Int, Word, Double, Float)
import qualified Prelude as P
import Control.Monad (void)
import GHCJS.Types (JSVal, JSString)
import GHCJS.Foreign (jsUndefined, jsNull)
import GHCJS.DOM.Types
import qualified GHCJS.DOM.Types as Types
import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import GHCJS.DOM.JSFFI.Generated.Enums
foreign import javascript safe "(($1) => { return $1[\"blur\"](); })"
js_blur :: HTMLOrSVGOrMathMLElement -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/HTMLElement/blur MDN HTMLOrSVGOrMathMLElement.blur documentation>
blur :: (MonadDOM m, IsHTMLOrSVGOrMathMLElement self) => self -> m ()
blur self = liftDOM (void ((js_blur ((Types.toHTMLOrSVGOrMathMLElement self)))))
foreign import javascript safe "(($1) => { return $1[\"focus\"](); })"
js_focus :: HTMLOrSVGOrMathMLElement -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/HTMLElement/focus MDN HTMLOrSVGOrMathMLElement.focus documentation>
focus :: (MonadDOM m, IsHTMLOrSVGOrMathMLElement self) => self -> m ()
focus self = liftDOM (void ((js_focus ((Types.toHTMLOrSVGOrMathMLElement self)))))
foreign import javascript safe "(($1, $2) => { return $1[\"focus\"]($2); })"
js_focus' :: HTMLOrSVGOrMathMLElement -> JSVal -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/HTMLElement/focus MDN HTMLOrSVGOrMathMLElement.focus documentation>
focus' :: (MonadDOM m, IsHTMLOrSVGOrMathMLElement self) => self -> Maybe FocusOptions -> m ()
focus' self options = liftDOM (void (((P.maybe (P.return jsUndefined) toJSVal options) >>= \a2' -> js_focus' ((Types.toHTMLOrSVGOrMathMLElement self)) a2')))
foreign import javascript unsafe "(($1) => { return $1[\"dataset\"]; })"
js_getDataset :: HTMLOrSVGOrMathMLElement -> IO DOMStringMap
-- | <https://developer.mozilla.org/docs/Web/API/HTMLElement/dataset MDN HTMLOrSVGOrMathMLElement.dataset documentation>
getDataset :: (MonadDOM m, IsHTMLOrSVGOrMathMLElement self) => self -> m DOMStringMap
getDataset self = liftDOM ((js_getDataset ((Types.toHTMLOrSVGOrMathMLElement self))))
foreign import javascript safe "(($1, $2) => { $1[\"nonce\"] = $2; })"
js_setNonce :: HTMLOrSVGOrMathMLElement -> JSString -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/HTMLElement/nonce MDN HTMLOrSVGOrMathMLElement.nonce documentation>
setNonce :: (MonadDOM m, IsHTMLOrSVGOrMathMLElement self, ToJSString val) => self -> val -> m ()
setNonce self val = liftDOM (void ((js_setNonce ((Types.toHTMLOrSVGOrMathMLElement self)) (toJSString val))))
foreign import javascript unsafe "(($1) => { return $1[\"nonce\"]; })"
js_getNonce :: HTMLOrSVGOrMathMLElement -> IO JSString
-- | <https://developer.mozilla.org/docs/Web/API/HTMLElement/nonce MDN HTMLOrSVGOrMathMLElement.nonce documentation>
getNonce :: (MonadDOM m, IsHTMLOrSVGOrMathMLElement self, FromJSString result) => self -> m result
getNonce self = liftDOM ((fromJSString <$> (js_getNonce ((Types.toHTMLOrSVGOrMathMLElement self)))))
foreign import javascript safe "(($1, $2) => { $1[\"autofocus\"] = $2; })"
js_setAutofocus :: HTMLOrSVGOrMathMLElement -> Bool -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/HTMLElement/autofocus MDN HTMLOrSVGOrMathMLElement.autofocus documentation>
setAutofocus :: (MonadDOM m, IsHTMLOrSVGOrMathMLElement self) => self -> Bool -> m ()
setAutofocus self val = liftDOM (void ((js_setAutofocus ((Types.toHTMLOrSVGOrMathMLElement self)) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"autofocus\"]; })"
js_getAutofocus :: HTMLOrSVGOrMathMLElement -> IO Bool
-- | <https://developer.mozilla.org/docs/Web/API/HTMLElement/autofocus MDN HTMLOrSVGOrMathMLElement.autofocus documentation>
getAutofocus :: (MonadDOM m, IsHTMLOrSVGOrMathMLElement self) => self -> m Bool
getAutofocus self = liftDOM ((js_getAutofocus ((Types.toHTMLOrSVGOrMathMLElement self))))
foreign import javascript safe "(($1, $2) => { $1[\"tabIndex\"] = $2; })"
js_setTabIndex :: HTMLOrSVGOrMathMLElement -> Int -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/HTMLElement/tabIndex MDN HTMLOrSVGOrMathMLElement.tabIndex documentation>
setTabIndex :: (MonadDOM m, IsHTMLOrSVGOrMathMLElement self) => self -> Int -> m ()
setTabIndex self val = liftDOM (void ((js_setTabIndex ((Types.toHTMLOrSVGOrMathMLElement self)) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"tabIndex\"]; })"
js_getTabIndex :: HTMLOrSVGOrMathMLElement -> IO Int
-- | <https://developer.mozilla.org/docs/Web/API/HTMLElement/tabIndex MDN HTMLOrSVGOrMathMLElement.tabIndex documentation>
getTabIndex :: (MonadDOM m, IsHTMLOrSVGOrMathMLElement self) => self -> m Int
getTabIndex self = liftDOM ((js_getTabIndex ((Types.toHTMLOrSVGOrMathMLElement self))))