this is broken for SVG elements where we want `xlink:href` --- there's no tests for this, but yeah, should probably do this another way.

Also, I think using `getAttribute()` breaks IE8, so this might not be backportable like this