src code

class method Observable.observeOnce

Observable.observeOnce(event_name,observer[,context]) → Function

Works exactly like observe, but will stopObserving after the first time the event is fired. Note that the observer that is passed in will be wrapped by another function which will be returned. The returned function can then be passed to stopObserving