Adds a child defined by block and returns it, for example to call ObservableResource.notifyObservers.