content(node, children) {
			if (!this.elem(node))
				return null;

			const dataNodes = node.querySelectorAll('[data-idref]');

			for (let i = 0; i < dataNodes.length; i++)
				delete this.registry[dataNodes[i].getAttribute('data-idref')];

			while (node.firstChild)
				node.removeChild(node.firstChild);

			return this.append(node, children);
		}
Replaces the content of the given node with the given children.

This function first removes any children of the given DOM
`Node` and then adds the given children following the
rules outlined below.

@instance
@memberof LuCI.dom
@param {*} node
The `Node` argument to replace the children of.

@param {*} [children]
The children to replace into the given node.

When `children` is an array, then each item of the array
will be either appended as child element or text node,
depending on whether the item is a DOM `Node` instance or
some other non-`null` value. Non-`Node`, non-`null` values
will be converted to strings first before being passed as
argument to `createTextNode()`.

When `children` is a function, it will be invoked with
the passed `node` argument as sole parameter and the `append`
function will be invoked again, with the given `node` argument
as first and the return value of the `children` function as
second parameter.

When `children` is a DOM `Node` instance, it will be
appended to the given `node`.

When `children` is any other non-`null` value, it will be
converted to a string and appended to the `innerHTML` property
of the given `node`.

@returns {Node|null}
Returns the last children `Node` appended to the node or `null`
if either the `node` argument was no valid DOM `node` or if the
`children` was `null` or didn't result in further DOM nodes.