Right now we set the class attribute every time the classList is changed. Maybe we could skip setting this attribute and mark it as dirty if there are no mutation observers/listeners?