The DOM module
The DOM module is there to help user create HTML files and build interfaces.
Creation and Rendering#
The two functions for creating and rendering DOM elements are dom and
print_dom (with alias render). The function signature of dom is
dom(tag, attr, ...), where
tag(character) is the name of a HTML tag,attr(a named list) is the attributes of the tag, and...may include additional tags that are inserted into the current tag.
Here is an example:
Shorthand notation#
A shorthand notation has been included in default_2_deparsers(), and
it resembles the syntax used by shiny. The tag name becomes a
function call; all named arguments will be passed to dom as
attributes, and the unnamed ones are passed as the additional tags to be
included.
By the way, here is a reference for HTML color names.