I see, well regardless, this change looks a bit weird, the logic is like

> if we are IE9 and this is not an SVGElement, use className, otherwise use setAttribute

But the logic that would make sense is more like

> If we have setAttribute, use setAttribute, otherwise if element.className is a string, use element.className

This should be more performant than the instanceof check, and feature-checking is generally a better way to work than relying on browser sniffing.

I would look at writing this like

```js
existingClasses = trim(existingClasses);

if (element.setAttribute) {
  element.setAttribute('class', existingClasses);
} else if (isString(element.className)) {
  element.className = existingClasses;
}
```

This could be obfuscated with clever operator use, but it basically comes down to feature detection rather than  sniffing, and avoiding the prototype lookup