emit `attr` when an attribute is added/changed

very useful for plugins