Safe Haskell | None |
---|
Document object model functions. Most of this doesn't have anything to do with the DOM and is actually ECMA library stuff, but I'll leave it in for now.
- data Document
- data Element
- data Event
- data Global
- data NodeList
- data Timer
- data XMLHttpRequest
- getWindow :: Fay Global
- getDocument :: Fay Document
- getBody :: Fay Element
- getElementById :: Text -> Fay Element
- getElementsByName :: Text -> Fay [Element]
- addEvent :: Text -> Fay f -> Fay ()
- removeEvent :: Element -> Text -> (Event -> Fay f) -> Fay ()
- stopProp :: Event -> Fay ()
- preventDefault :: Event -> Fay ()
- createElement :: Text -> Fay Element
- appendChild :: Element -> Element -> Fay ()
- appendChildBefore :: Element -> Element -> Fay ()
- removeChild :: Element -> Element -> Fay ()
- parentNode :: Element -> Fay Element
- children :: Element -> Fay NodeList
- childNodes :: Element -> Fay NodeList
- nodeListToArray :: NodeList -> [Element]
- nodesBetween :: Element -> Element -> Fay [Element]
- removeNodesBetween :: Element -> Element -> Fay ()
- createTextNode :: Text -> Fay Element
- getTextData :: Element -> Fay Text
- setTextData :: Element -> Text -> Fay ()
- clearInnerHtml :: Element -> Fay ()
- klass :: Element -> Text -> Fay ()
- addClass :: Element -> Text -> Fay ()
- removeClass :: Element -> Text -> Fay ()
- toggleClass :: Element -> Text -> Fay ()
- hasClass :: Element -> Text -> Fay Bool
- setAttr :: Element -> Text -> Text -> Fay ()
- getAttr :: Element -> Text -> Fay Text
- hasAttr :: Element -> Text -> Fay Bool
- getValue :: Element -> Fay Text
- setValue :: Element -> Text -> Fay ()
- isChecked :: Element -> Fay Bool
- setChecked :: Element -> Bool -> Fay ()
- getRadioValue :: Text -> Fay Text
- setRadioValue :: Text -> Text -> Fay ()
- getCurrentUrl :: Fay Text
- logS :: Text -> Fay ()
- logF :: f -> Fay ()
- setInterval :: Double -> (Timer -> Fay ()) -> Fay Timer
- clearInterval :: Timer -> Fay ()
- setTimeout :: Double -> (Timer -> Fay ()) -> Fay Timer
- clearTimeout :: Timer -> Fay ()
- data RequestMethod
- data ReadyState
- = UNSENT
- | OPENED
- | HEADERS_RECEIVED
- | LOADING
- | DONE
- xmlHttpRequest :: Fay XMLHttpRequest
- open :: RequestMethod -> Text -> XMLHttpRequest -> Fay XMLHttpRequest
- send :: XMLHttpRequest -> Fay ()
- setReadyStateHandler :: (XMLHttpRequest -> Fay ()) -> XMLHttpRequest -> Fay XMLHttpRequest
- readyState :: XMLHttpRequest -> Fay ReadyState
- responseText :: XMLHttpRequest -> Fay Text
- status :: XMLHttpRequest -> Fay Int
- parseInt :: Text -> Fay Int
- scrollIntoView :: Element -> Fay ()
- scrollRelative :: Int -> Fay ()
- scrollAbsolute :: Int -> Fay ()
Documentation
data XMLHttpRequest Source
getElementById :: Text -> Fay ElementSource
getElementsByName :: Text -> Fay [Element]Source
preventDefault :: Event -> Fay ()Source
createElement :: Text -> Fay ElementSource
appendChild :: Element -> Element -> Fay ()Source
appendChildBefore :: Element -> Element -> Fay ()Source
removeChild :: Element -> Element -> Fay ()Source
parentNode :: Element -> Fay ElementSource
childNodes :: Element -> Fay NodeListSource
nodeListToArray :: NodeList -> [Element]Source
removeNodesBetween :: Element -> Element -> Fay ()Source
createTextNode :: Text -> Fay ElementSource
getTextData :: Element -> Fay TextSource
setTextData :: Element -> Text -> Fay ()Source
clearInnerHtml :: Element -> Fay ()Source
removeClass :: Element -> Text -> Fay ()Source
toggleClass :: Element -> Text -> Fay ()Source
setChecked :: Element -> Bool -> Fay ()Source
getRadioValue :: Text -> Fay TextSource
setRadioValue :: Text -> Text -> Fay ()Source
setInterval :: Double -> (Timer -> Fay ()) -> Fay TimerSource
setInterval except the calling function gets the timer as an | argument so the interval can be cancelled from within it.
clearInterval :: Timer -> Fay ()Source
setTimeout :: Double -> (Timer -> Fay ()) -> Fay TimerSource
setTimeout except the calling function gets the timer as an | argument. Primarily for symmetry with setInterval.
clearTimeout :: Timer -> Fay ()Source
open :: RequestMethod -> Text -> XMLHttpRequest -> Fay XMLHttpRequestSource
send :: XMLHttpRequest -> Fay ()Source
setReadyStateHandler :: (XMLHttpRequest -> Fay ()) -> XMLHttpRequest -> Fay XMLHttpRequestSource
status :: XMLHttpRequest -> Fay IntSource
scrollIntoView :: Element -> Fay ()Source
scrollRelative :: Int -> Fay ()Source
scrollAbsolute :: Int -> Fay ()Source