WidgetDefinition.defaults can be a function.