A set of functions that map the entire list of the W3C DOM elements. Each function returns a snabbdom vnode object.
This export will return a list of functions, where each function was created from a partially applied curry. Each function represents a tag in the list of W3C allowed tags, including deprecated, and experimental.
Each tag takes an optional object as an argument. If no value is given it functions like so:
To give values to these tags simply pass them as keys on the object, where certain keys are special like
selector. Selector allows you to easily define the DOM selector of the element, with the CSS id and class syntax:
Content is either a String (of text) or an Array of Nodes and/or String:
Some tags have no content, they are called void elements. For example:
If you give a empty tag any children it will throw an error:
// new Error("Empty tag cannot semantically have children")
Finally you can give any other attributes to your element:
snabbdom-helpers relies on
snabbdom you can also use it's special style and event syntax systems.
Here's a large example:
It should output (minus white-spacing):
git checkout -b my-new-feature)
git commit -am 'Add some feature')
git push origin my-new-feature)