Module

Web.Chain

Package
purescript-web-chain
Repository
david-sledge/purescript-web-chain

Re-exports from Web.Chain.DOM

#txn Source

txn :: forall m. MonadEffect m => String -> m Node

Calls tx and applies the result to nd: nd <<< tx.

#tx Source

tx :: forall m. MonadEffect m => String -> m Text

Creates a text node from a String.

#setAttrsM Source

setAttrsM :: forall e f m. Foldable f => ElementOp e => MonadEffect m => f (String /\ String) -> m e -> m e

Sets the attributes of an element. Existing attributes of the same names are overwritten. New names create new attributes. The element is returned.

#setAttrs Source

setAttrs :: forall e f m. Foldable f => ElementOp e => MonadEffect m => f (String /\ String) -> e -> m e

Sets the attributes of an element. Existing attributes of the same names are overwritten. New names create new attributes. The element is returned.

#rmAttrM Source

rmAttrM :: forall m e. MonadEffect m => ElementOp e => String -> m e -> m e

Removes an attribute from an element. The element is returned.

#rmAttr Source

rmAttr :: forall m e. MonadEffect m => ElementOp e => String -> e -> m e

Removes an attribute from an element. The element is returned.

#removeM Source

removeM :: forall c m. MonadEffect m => NodeOp c => m c -> m c

Calls detach on the node and its descendants, and in addition removes all event listeners from the detached node and descendants. The event listners are removed provided that they were added using Web.Event.Class.EventTargetOp.on or derivation thereof such as Web.Event.Class.EventTargetOp.change or Web.Event.Class.EventTargetOp.ready. The removed node is returned.

#remove Source

remove :: forall c m. MonadEffect m => NodeOp c => c -> m c

Calls detach on the node and its descendants, and in addition removes all event listeners from the detached node and descendants. The event listners are removed provided that they were added using Web.Event.Class.EventTargetOp.on or derivation thereof such as Web.Event.Class.EventTargetOp.change or Web.Event.Class.EventTargetOp.ready. The removed node is returned.

#ndM Source

ndM :: forall n m. Functor m => NodeOp n => m n -> m Node

Put an instance of a NodeOp in a continuation.

#nd Source

nd :: forall n m. NodeOp n => Applicative m => n -> m Node

#emptyM Source

emptyM :: forall m p. MonadEffect m => NodeOp p => m p -> m p

Calls remove on the all of the node's children. The emptied node is returned.

#empty Source

empty :: forall m p. MonadEffect m => NodeOp p => p -> m p

Calls remove on the all of the node's children. The emptied node is returned.

#eln Source

eln :: forall m f1 f2. Bind m => MonadEffect m => Foldable f1 => Foldable f2 => String -> f1 (String /\ String) -> f2 (m Node) -> m Node

Calls el and applies the result to nd: nd <<< el tagName attributes.

#el Source

el :: forall m f1 f2. Bind m => MonadEffect m => Foldable f1 => Foldable f2 => String -> f1 (String /\ String) -> f2 (m Node) -> m Element

Creates an element, set attributes, and appends child nodes.

#doc Source

doc :: forall m. MonadEffect m => m HTMLDocument

#detachM Source

detachM :: forall c m. MonadEffect m => NodeOp c => m c -> m c

Detatches a node from its parent node and returns the detached node. Descendant nodes and event listeners are not affected. The detatched node is returned.

#detach Source

detach :: forall c m. MonadEffect m => NodeOp c => c -> m c

Detatches a node from its parent node and returns the detached node. Descendant nodes and event listeners are not affected. The detatched node is returned.

#attrM Source

attrM :: forall m e. MonadEffect m => ElementOp e => String -> m e -> m (Maybe String)

Gets the value of the named attibute.

#attr Source

attr :: forall m e. MonadEffect m => ElementOp e => String -> e -> m (Maybe String)

Gets the value of the named attibute.

#appendsNodesM Source

appendsNodesM :: forall m p f. NodeOp p => Foldable f => MonadEffect m => m p -> f (m Node) -> m p

#appendsNodes Source

appendsNodes :: forall m p f. NodeOp p => Foldable f => MonadEffect m => p -> f (m Node) -> m p

#appendNodesM Source

appendNodesM :: forall m p f. NodeOp p => Foldable f => MonadEffect m => f (m Node) -> m p -> m p

Extracts child nodes from a Foldable of continuations and appends them to a monadic parent node. Returns the given parent node.

#appendNodes Source

appendNodes :: forall m p f. Foldable f => MonadEffect m => NodeOp p => f (m Node) -> p -> m p

Extracts child nodes from a Foldable of continuations and appends them to a parent node. Returns the given parent node.

#(>>+) Source

Operator alias for Web.Chain.DOM.appendNodesM (non-associative / precedence 9)

#(>+) Source

Operator alias for Web.Chain.DOM.appendNodes (non-associative / precedence 9)

#(+<<) Source

Operator alias for Web.Chain.DOM.appendsNodesM (non-associative / precedence 9)

#(+<) Source

Operator alias for Web.Chain.DOM.appendsNodes (non-associative / precedence 9)

Re-exports from Web.Event.Class.EventTargetOp

#EventOptions Source

type EventOptions = { bubbles :: Boolean, cancelable :: Boolean, composed :: Boolean }

#EventTargetOp Source

class EventTargetOp et  where

Members

Instances

#unregisterListener Source

unregisterListener :: forall a m t. MonadEffect m => EventTargetOp t => ListenerDetails a -> t -> m Boolean

#typeOffOptionsM Source

typeOffOptionsM :: forall t m. MonadEffect m => EventTargetOp t => String -> ListenerOptions -> m t -> m t

Removes all event handler functions of the given type from an event target. The target is returned.

#typeOffOptions Source

typeOffOptions :: forall t m. MonadEffect m => EventTargetOp t => String -> ListenerOptions -> t -> m t

Removes all event handler functions of the given type from an event target. The target is returned.

#typeOffM Source

typeOffM :: forall m t. Bind m => MonadEffect m => EventTargetOp t => String -> m t -> m t

Removes all event handler functions of the given type from an event target. The target is returned.

#typeOff Source

typeOff :: forall t m. MonadEffect m => EventTargetOp t => String -> t -> m t

Removes all event handler functions of the given type from an event target. The target is returned.

#triggerOptionsM Source

triggerOptionsM :: forall t m. EventTargetOp t => MonadEffect m => String -> EventOptions -> m t -> m t

Triggers the event handlers tied to the event type to the event target. The target is returned.

#triggerOptions Source

triggerOptions :: forall t m. EventTargetOp t => MonadEffect m => String -> EventOptions -> t -> m t

Triggers the event handlers tied to the event type to the event target. The target is returned.

#triggerM Source

triggerM :: forall t m. EventTargetOp t => MonadEffect m => String -> m t -> m t

Triggers the event handlers tied to the event type to the event target. The target is returned.

#trigger Source

trigger :: forall t m. EventTargetOp t => MonadEffect m => String -> t -> m t

Triggers the event handlers tied to the event type to the event target. The target is returned.

#registerListener Source

registerListener :: forall a m t. MonadEffect m => EventTargetOp t => String -> (Event -> Effect a) -> ListenerOptions -> t -> m Unit

Attach an event handler function to the event target. The target is returned.

#onOptionsM Source

onOptionsM :: forall a m t. MonadEffect m => EventTargetOp t => String -> (Event -> Effect a) -> ListenerOptions -> m t -> m t

#onOptions Source

onOptions :: forall a m t. MonadEffect m => EventTargetOp t => String -> (Event -> Effect a) -> ListenerOptions -> t -> m t

Attach an event handler function to the event target. The target is returned.

#onM Source

onM :: forall a m t. MonadEffect m => EventTargetOp t => String -> (Event -> Effect a) -> m t -> m t

Attach an event handler function to the event target. The target is returned.

#on Source

on :: forall a m t. MonadEffect m => EventTargetOp t => String -> (Event -> Effect a) -> t -> m t

Attach an event handler function to the event target. The target is returned.

#offOptionsM Source

offOptionsM :: forall a m t. MonadEffect m => EventTargetOp t => String -> (Event -> Effect a) -> ListenerOptions -> m t -> m t

Removes an event handler function from an event target. The target is returned.

#offOptions Source

offOptions :: forall a m t. MonadEffect m => EventTargetOp t => String -> (Event -> Effect a) -> ListenerOptions -> t -> m t

Removes an event handler function from an event target. The target is returned.

#offM Source

offM :: forall a m t. MonadEffect m => EventTargetOp t => String -> (Event -> Effect a) -> m t -> m t

Removes an event handler function from an event target. The target is returned.

#off Source

off :: forall a m t. MonadEffect m => EventTargetOp t => String -> (Event -> Effect a) -> t -> m t

Removes an event handler function from an event target. The target is returned.

#getAllListeners Source

getAllListeners :: forall a m t. MonadEffect m => EventTargetOp t => t -> m (Array (ListenerDetails a))

#allOffM Source

allOffM :: forall m t. Bind m => MonadEffect m => EventTargetOp t => m t -> m t

Removes all event handler functions from an event target. The target is returned.

#allOff Source

allOff :: forall m t. Bind m => MonadEffect m => EventTargetOp t => t -> m t

Removes all event handler functions from an event target. The target is returned.