Update attr.js

Consistent with prop.js