DOMBuilder.build() [docs]

Tags are specified as Arrays in which:

  1. The first item is the tagName (supporting Jade-style id/class definition, e.g. div#id.class1.class2)
  2. Attributes can be specified as an Object given as the second item.
  3. Otherwise, all additional items are children.

The only exception to this is when specifying a DocumentFragment, which is created if the first item in the Array is '#document-fragment' – fragments cannot have attributes, so all additional items are children.

using output mode.

Output