Constructor.
target document to transform to
listener to provide a different behavior
Converts the given node and its children to the target document. The processing is performed in this order:
node to convert
the imported, not yet attached, node along with converted child
nodes; undefined if the node is to be ignored in the target document.
Converts the given original node via convert and subsequently
appends the result to targetParentNode. Different to convert this
ensures that appended handler is also called when appending to
target parent node.
original node to transform
node in target document where to append the conversion result to.
The HTML DOM Converter is dedicated to XML grammars, that are closely related to HTML. Typically, the counterpart offers a subset of elements and attributes compared to HTML.
This is an important restriction regarding DOM transformation, as some candy during transformation only comes for HTML elements, such as access to
classListorstyleattributes. Anyclassattribute of a custom namespace requires to be parsed manually (at least, if it has a namespace prefix).