Make library more dev-friendly.

Fixes #1.
Wouldn't it be faster if we turned `attributeFilter` into a map and just lookup the attribute name instead of searching the array every time? Might help if there are lots of attribute change events (e.g. animations).