Flexible attributes with JavaScript entities