WICG / observable

Observable API proposal
https://wicg.github.io/observable/
Other
575 stars 14 forks source link

Spec the `Observer#takeUntil()` operator #103

Closed domfarolino closed 8 months ago

domfarolino commented 8 months ago

This seems like one of the more complicated operators, so hopefully the attempt here is sound.

The corner cases around this one are ensuring that we properly unsubscribe from |notifier| and |sourceObservable| simultaneously whenever we need to. This PR has a lot of documentation, so I'll direct the reader's attention to the text there which describes the mechanics I've put in place to hopefully get it all right.

WPTs incoming.

Prototype implementation in Chromium: https://chromium-review.googlesource.com/c/chromium/src/+/5228477.


Preview | Diff

domfarolino commented 8 months ago

@benlesh and @keithamus I'd appreciate a review on the method in https://pr-preview.s3.amazonaws.com/WICG/observable/pull/103.html#dom-observable-takeuntil.

domfarolino commented 8 months ago

Thanks!