API Docs for: 0.0.1
Show:

NS-vdom Class

Module: vdom-ns
Parent Module: vdom

Creates a Namespace that can be used accros multiple vdom-modules to share information.

Copyright (c) 2014 ITSA - https://github.com/itsa
New BSD License - http://choosealicense.com/licenses/bsd-3-clause/

Methods

domNodeToVNode

(
  • domNode
  • [parentVNode]
)
Vnode

Provided by the node-parser module.

Defined in src/vdom/partials/node-parser.js:35

Available since 0.0.1

Transforms a dom-node into a vnode.

Parameters:

  • domNode Node

    The dom-node to be transformed

  • [parentVNode] Vnode optional

    the parent-vnode that belongs to the dom-node

Returns:

Vnode:

the vnode-representation of the dom-node

htmlToVNodes

(
  • htmlString
)
Array

Provided by the html-parser module.

Defined in src/vdom/partials/html-parser.js:101

Available since 0.0.1

Transforms html-text into a vnodes-Array.

Parameters:

  • htmlString String

    plain html as string

Returns:

Array:

array with vnodes

Properties

body

VElement

Defined in src/vdom/partials/vdom-ns.js:139

Available since 0.0.1

Reference to the VElement of document.body (gets its value as soon as it gets refered to)

Default: null

nonVoidElements

Object

Defined in src/vdom/partials/vdom-ns.js:157

Available since 0.0.1

A hash with all encountered non-void Elements

Default: {}

SCRIPT_OR_STYLE_TAG

Object

Defined in src/vdom/partials/vdom-ns.js:167

Available since 0.0.1

A hash to identify what tagNames are equal to SCRIPT or STYLE.

Default: {SCRIPT: true, STYLE: true}

VALID_NODE_TYPES

Object

Defined in src/vdom/partials/vdom-ns.js:181

Available since 0.0.1

A hash with all nodeTypes that should be captured by the vDOM.

Default: {1: true, 3: true, 8: true}

voidElements

Object

Defined in src/vdom/partials/vdom-ns.js:195

Available since 0.0.1

A hash with all encountered void Elements

Default: {}