Invokes the delegate corresponding to the notification or the observer's method corresponding to the notification and returns the produced result.
[observer]
(Observer): Observer to invoke the notification on.[onNext]
(Function): Function to invoke for an OnNext notification.[onError]
(Function): Function to invoke for an OnError notification.[onError]
(Function): Function to invoke for an OnCompleted notification.
(Any): Result produced by the observation.
{% if book.isPdf %}
var observer = Rx.Observer.create(x => x);
var notification = Rx.Notification.createOnNext(42);
console.log(notification.accept(observer));
// => 42
var notification = Rx.Notification.createOnNext(42);
console.log(notification.accept(x => x));
// => 42
{% else %}
{% endif %}
{% if book.isPdf %}
{% else %}
- rx.js
{% endif %}