Module

Text.Smolder.Markup

Package
purescript-smolder
Repository
bodil/purescript-smolder

#Attr Source

data Attr

Constructors

#EventHandler Source

#MarkupM Source

data MarkupM e a

Representation of a markup node.

This is either an Element, which maps to a DOM element, a Content node, which maps to a DOM text node, or Empty, which maps to an empty NodeList.

Constructors

Instances

#Markup Source

type Markup e = Free (MarkupM e) Unit

The type of a sequence of markup nodes.

#mapEvent Source

mapEvent :: forall r l. (l -> r) -> (Free (MarkupM l)) ~> (Free (MarkupM r))

Change the event type of a markup sequence.

#parent Source

parent :: forall e. String -> Markup e -> Markup e

Create a named parent node with a sequence of children.

#leaf Source

leaf :: forall e. String -> Markup e

Create a named leaf node.

#text Source

text :: forall e. String -> Markup e

Create a text node.

#attribute Source

attribute :: String -> String -> Attribute

Create an attribute.

#Attributable Source

class Attributable a  where

Members

Instances

#(!) Source

Operator alias for Text.Smolder.Markup.with (left-associative / precedence 4)

#optionalWith Source

optionalWith :: forall h. Attributable h => h -> Boolean -> Attribute -> h

Add an attribute to a markup node only if the supplied boolean value is true.

#(!?) Source

Operator alias for Text.Smolder.Markup.optionalWith (left-associative / precedence 4)

#EventHandlers Source

#Eventable Source

class Eventable e a | a -> e where

Members

Instances

#(#!) Source

Operator alias for Text.Smolder.Markup.withEvent (left-associative / precedence 4)

#on Source

on :: forall e. String -> e -> EventHandlers e

Construct an event handler for a named event.