modify method

dynamic modify (dynamic f(Set<String> s))
inherited

Helper method used to modify the set of css classes on this element.

f - callback with: s - a Set of all the css class name currently on this element.

After f returns, the modified set is written to the className property of this element.

Implementation

modify(f(Set<String> s)) {
  Set<String> s = readClasses();
  var ret = f(s);
  writeClasses(s);
  return ret;
}