add method - CssClassSet class - dart:html library (original) (raw)

add abstract method

bool add(

  1. String value )

override

Add the class value to element.

add and addAll are the Dart equivalent of jQuery'saddClass.

If this CssClassSet corresponds to one element. Returns true if value was added to the set, otherwise false.

If this CssClassSet corresponds to many elements, false is always returned.

value must be a valid 'token' representing a single class, i.e. a non-empty string containing no whitespace. To add multiple classes useaddAll.

Implementation

bool add(String value);