applyWhere<T extends DOMElement> method

T applyWhere<T extends DOMElement>(
  1. Object? selector, {
  2. dynamic id,
  3. dynamic classes,
  4. dynamic style,
})

Applies id, classes and style to children nodes that matches selector.

Implementation

T applyWhere<T extends DOMElement>(Object? selector, {id, classes, style}) {
  var all = selectAllWhere(selector);

  for (var elem in all) {
    if (elem is DOMElement) {
      elem.apply(id: id, classes: classes, style: style);
    }
  }

  return this as T;
}