W3cubDocs

/Dart 2

classes property

CssClassSet classes

The union of all CSS classes applied to the elements in this list.

This set makes it easy to add, remove or toggle (add if not present, remove if present) the classes applied to a collection of elements.

htmlList.classes.add('selected');
htmlList.classes.toggle('isOnline');
htmlList.classes.remove('selected');

Implementation

CssClassSet get classes;
void classes= (Iterable<String> value)

Replace the classes with value for every element in this list.

Implementation

set classes(Iterable<String> value);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-html/ElementList/classes.html