queryElement method

String? queryElement(
  1. String query, {
  2. DOMContext? domContext,
  3. bool buildTemplates = false,
})

Implementation

String? queryElement(String query,
    {DOMContext? domContext, bool buildTemplates = false}) {
  if (isEmptyString(query)) return null;

  var rootDOMNode = this.rootDOMNode as DOMElement;

  var node = rootDOMNode.select(query)!;

  var html =
      node.buildHTML(domContext: domContext, buildTemplates: buildTemplates);

  html = html.replaceFirst(regexpTagOpen, '');
  html = html.replaceFirst(regexpTagClose, '');

  return html;
}