Safe Haskell | None |
---|---|

Language | Haskell2010 |

Monad and Monoid instances for a builder that hang DOM elements from the current parent element. It uses Haste.DOM from the haste-compiler

- newtype PerchM a = Perch {}
- type Perch = PerchM ()
- class ToElem a where
- attr :: PerchM a1 -> (PropID, String) -> PerchM a
- nelem :: String -> Perch
- child :: ToElem a => Perch -> a -> Perch
- setHtml :: Perch -> String -> Perch
- addEvent :: Perch -> Event IO a -> a -> Perch
- area :: Perch
- base :: Perch
- br :: Perch
- col :: Perch
- embed :: Perch
- hr :: Perch
- img :: Perch
- input :: Perch
- keygen :: Perch
- link :: Perch
- menuitem :: Perch
- meta :: Perch
- param :: Perch
- source :: Perch
- track :: Perch
- wbr :: Perch
- a :: ToElem a => a -> Perch
- abbr :: ToElem a => a -> Perch
- address :: ToElem a => a -> Perch
- article :: ToElem a => a -> Perch
- aside :: ToElem a => a -> Perch
- audio :: ToElem a => a -> Perch
- b :: ToElem a => a -> Perch
- bdo :: ToElem a => a -> Perch
- blockquote :: ToElem a => a -> Perch
- body :: ToElem a => a -> Perch
- button :: ToElem a => a -> Perch
- canvas :: ToElem a => a -> Perch
- caption :: ToElem a => a -> Perch
- cite :: ToElem a => a -> Perch
- code :: ToElem a => a -> Perch
- colgroup :: ToElem a => a -> Perch
- command :: ToElem a => a -> Perch
- datalist :: ToElem a => a -> Perch
- dd :: ToElem a => a -> Perch
- del :: ToElem a => a -> Perch
- details :: ToElem a => a -> Perch
- dfn :: ToElem a => a -> Perch
- div :: ToElem a => a -> Perch
- dl :: ToElem a => a -> Perch
- dt :: ToElem a => a -> Perch
- em :: ToElem a => a -> Perch
- fieldset :: ToElem a => a -> Perch
- figcaption :: ToElem a => a -> Perch
- figure :: ToElem a => a -> Perch
- footer :: ToElem a => a -> Perch
- form :: ToElem a => a -> Perch
- h1 :: ToElem a => a -> Perch
- h2 :: ToElem a => a -> Perch
- h3 :: ToElem a => a -> Perch
- h4 :: ToElem a => a -> Perch
- h5 :: ToElem a => a -> Perch
- h6 :: ToElem a => a -> Perch
- head :: ToElem a => a -> Perch
- header :: ToElem a => a -> Perch
- hgroup :: ToElem a => a -> Perch
- html :: ToElem a => a -> Perch
- i :: ToElem a => a -> Perch
- iframe :: ToElem a => a -> Perch
- ins :: ToElem a => a -> Perch
- kbd :: ToElem a => a -> Perch
- label :: ToElem a => a -> Perch
- legend :: ToElem a => a -> Perch
- li :: ToElem a => a -> Perch
- map :: ToElem a => a -> Perch
- mark :: ToElem a => a -> Perch
- menu :: ToElem a => a -> Perch
- meter :: ToElem a => a -> Perch
- nav :: ToElem a => a -> Perch
- noscript :: ToElem a => a -> Perch
- object :: ToElem a => a -> Perch
- ol :: ToElem a => a -> Perch
- optgroup :: ToElem a => a -> Perch
- option :: ToElem a => a -> Perch
- output :: ToElem a => a -> Perch
- p :: ToElem a => a -> Perch
- pre :: ToElem a => a -> Perch
- progress :: ToElem a => a -> Perch
- q :: ToElem a => a -> Perch
- rp :: ToElem a => a -> Perch
- rt :: ToElem a => a -> Perch
- ruby :: ToElem a => a -> Perch
- samp :: ToElem a => a -> Perch
- script :: ToElem a => a -> Perch
- section :: ToElem a => a -> Perch
- select :: ToElem a => a -> Perch
- small :: ToElem a => a -> Perch
- span :: ToElem a => a -> Perch
- strong :: ToElem a => a -> Perch
- sub :: ToElem a => a -> Perch
- summary :: ToElem a => a -> Perch
- sup :: ToElem a => a -> Perch
- table :: ToElem a => a -> Perch
- tbody :: ToElem a => a -> Perch
- td :: ToElem a => a -> Perch
- textarea :: ToElem a => a -> Perch
- tfoot :: ToElem a => a -> Perch
- th :: ToElem a => a -> Perch
- thead :: ToElem a => a -> Perch
- time :: ToElem a => a -> Perch
- title :: ToElem a => a -> Perch
- tr :: ToElem a => a -> Perch
- ul :: ToElem a => a -> Perch
- var :: ToElem a => a -> Perch
- video :: ToElem a => a -> Perch
- ctag :: ToElem a => String -> a -> Perch
- center :: ToElem a => a -> Perch
- noHtml :: Perch
- type Attribute = (String, String)
- class Attributable h where
- atr :: t -> t1 -> (t, t1)
- style :: t -> (String, t)
- id :: t -> (String, t)
- width :: t -> (String, t)
- height :: t -> (String, t)
- href :: t -> (String, t)
- src :: t -> (String, t)
- this :: Perch
- goParent :: Perch -> Perch -> Perch
- delete :: Perch
- clear :: Perch
- parent :: Elem -> IO Elem
- getBody :: IO Elem
- getDocument :: IO Elem
- forElems' :: String -> Perch -> IO ()
- withElems' :: String -> Perch -> IO ()
- forElems :: String -> Perch -> Perch
- withElems :: String -> Perch -> Perch

# Documentation

addEvent :: Perch -> Event IO a -> a -> Perch Source

create an element and add a Haste event handler to it.

blockquote :: ToElem a => a -> Perch Source

figcaption :: ToElem a => a -> Perch Source

class Attributable h where Source

Attributable Perch | |

ToElem a => Attributable (a -> Perch) |

goParent :: Perch -> Perch -> Perch Source

goes to the parent node of the first and execute the second

getDocument :: IO Elem Source