apply<T extends DOMElement> method

T apply<T extends DOMElement>({
  1. dynamic id,
  2. dynamic classes,
  3. dynamic style,
})

Applies id, classes and style to this instance.

Implementation

T apply<T extends DOMElement>({id, classes, style}) {
  if (id != null) {
    setAttribute('id', id);
  }

  if (classes != null) {
    appendToAttribute('classes', classes);
  }

  if (style != null) {
    appendToAttribute('style', style);
  }

  return this as T;
}