Some webkit version doesn't implement classList for SVGElement but only for HTMLElement. Add condition to check that.