Module skooma.dom
Simple DOM generation library
Functions
render (node) | Renders a dom node |
next_attribute (node, previous) | Like next, but for node attributes (string keys). |
attributes (node) | like pairs but for node attributes (string keys). |
insert (node, subtree) | Inserts a subtree into a node. |
node (name, format) | Creates a new DOM node. |
Tables
node | Table representing a DOM node. |
Functions
- render (node)
-
Renders a dom node
Parameters:
- node node
- next_attribute (node, previous)
-
Like next, but for node attributes (string keys).
Parameters:
- node
- previous
- attributes (node)
-
like pairs but for node attributes (string keys).
Parameters:
- node
- insert (node, subtree)
-
Inserts a subtree into a node.
Non-table values and nodes are inserted as-is.
Tables are iterated and their integer keys are inserted into the
given node in order while string keys are set as attributes.
Parameters:
- node
- subtree
- node (name, format)
-
Creates a new DOM node.
Parameters: