classList property
DOMTokenList
get
classList
The Element.classList is a read-only property that
returns a live DOMTokenList collection of the class
attributes of the element. This can then be used to manipulate the class
list.
Using classList is a convenient alternative to accessing an element's
list
of classes as a space-delimited string via element.className.
Implementation
external DOMTokenList get classList;