Module

Specular.Dom.Node.Class

Package
purescript-specular
Repository
restaumatic/purescript-specular

Module preserved only for backwards compatibility. Use Specular.Dom.Browser instead.

Re-exports from Specular.Dom.Browser

#TagName Source

#Node Source

data Node

DOM node.

#Namespace Source

type Namespace = String

XML namespace URI.

#EventType Source

type EventType = String

HTML event type, e.g. "click".

#Event Source

data Event

DOM event.

#setAttributes Source

#removeAttributesImpl Source

#removeAllBetweenImpl Source

#removeAllBetween Source

removeAllBetween :: Node -> Node -> Effect Unit

removeAllBetween from to

Remove all nodes after from and before to from their parent. from and to are not removed.

Assumes that from and to have the same parent, and from is before to.

#preventDefault Source

preventDefault :: Event -> Effect Unit

JS Event.preventDefault().

#parentNodeImpl Source

#parentNode Source

parentNode :: Node -> Effect (Maybe Node)

Return parent node of the node, or Nothing if it has been detached.

#moveAllBetweenInclusiveImpl Source

#moveAllBetweenInclusive Source

moveAllBetweenInclusive :: Node -> Node -> Node -> Effect Unit

moveAllBetweenInclusive from to parent

Moves from, all nodes after from and before to and to to parent.

Assumes that from and to have the same parent, and from is before to.

#insertBeforeImpl Source

#insertBefore Source

insertBefore :: Node -> Node -> Node -> Effect Unit

insertBefore newNode nodeAfter parent Insert newNode before nodeAfter in parent

#innerHTML Source

innerHTML :: Node -> Effect String

Get innerHTML of a node.

#createTextNodeImpl Source

#createElementNS Source

createElementNS :: Maybe Namespace -> TagName -> Effect Node

Create an element, optionally with namespace.

#createDocumentFragmentImpl Source

#createDocumentFragment Source

#appendRawHtmlImpl Source

#appendRawHtml Source

appendRawHtml :: String -> Node -> Effect Unit

Append a chunk of raw HTML to the end of the node.

#appendChildImpl Source

#appendChild Source

appendChild :: Node -> Node -> Effect Unit

appendChild newNode parent

#addEventListenerImpl Source

#addEventListener Source

addEventListener :: EventType -> (Event -> Effect Unit) -> Node -> Effect (Effect Unit)

Register an event listener. Returns unregister action.

#(:=) Source

Operator alias for Foreign.Object.singleton (non-associative / precedence 8)

Convenient syntax for building Attrs