appendTo static method

StringBuffer appendTo(
  1. StringBuffer s,
  2. String delimiter,
  3. DOMAttribute? attribute, {
  4. DOMContext<Object>? domContext,
  5. DSXResolution dsxResolution = DSXResolution.skipDSX,
})

Implementation

static StringBuffer appendTo(
  StringBuffer s,
  String delimiter,
  DOMAttribute? attribute, {
  DOMContext? domContext,
  DSXResolution dsxResolution = DSXResolution.skipDSX,
}) {
  if (attribute == null) return s;
  var append = attribute.buildHTML(
    domContext: domContext,
    dsxResolution: dsxResolution,
  );
  if (append.isEmpty) return s;
  s.write(delimiter);
  s.write(append);
  return s;
}