$onContentRefresh for custom attributes

Close #314