classList.contains for event listener code example
Example: classlist
// use the classList API to remove and add classes
div.classList.remove("foo");
div.classList.add("anotherclass");
// use the classList API to remove and add classes
div.classList.remove("foo");
div.classList.add("anotherclass");