I'm not aware of a "method" in the sense of a "function" associated with classList
. It has .add()
and .remove()
methods to add or remove individual classes, but you can clear the list in the sense of removing all classes from the element like this:
element.className = "";