It might be worth cleaning up this logic a bit, now that we have two browsers and multiple attributes. Nested, partially-negated boolean logic is not easy on the reader.

It's probably not actually important that we do the browser matching. Maybe just matching the pre-computed `attr.nodeName` against an array of attributes to ignore?