nodeByID<T extends DOMNode> method
Returns a child node by id
.
Implementation
T? nodeByID<T extends DOMNode>(String? id) {
if (id == null || id.isEmpty || isEmptyContent) return null;
if (id.startsWith('#')) id = id.substring(1);
return nodeWhere((n) => n is DOMElement && n.id == id);
}