I am working on a page where the selected item among a list is characterized by NOT having a given class. Something like the following:
Apart from Temanis answer you can use the not selector in this case
not
document.querySelectorAll('li.a:not(.b)')