- From: Jafar Husain <notifications@github.com>
- Date: Thu, 14 Dec 2017 09:15:46 -0800
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 14 December 2017 17:16:12 UTC
Concur with @domenic. There are unquestionably impedance mismatches between EventTarget/Observables and Promises due to the way each schedules notifications respectively. However there are plenty of simple use cases in which adapting ET/Observable to Promises is convenient and safe, and we should enable those. I think the best course of action is to provide methods to allow developers to handle ET concerns prior to adaptation (ie the do method). Sent from my iPhone > On Dec 14, 2017, at 8:46 AM, Domenic Denicola <notifications@github.com> wrote: > > Just to reiterate, I don't expect the primary way for people to use observables to subscribe to events to be promises. That is only when you want to convert into a promise-using ecosystem (e.g. service worker's waitUntil). Most of the time you'll just do e.g. element.on("click").subscribe(e => e.preventDefault()). > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub, or mute the thread. > -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/544#issuecomment-351777056
Received on Thursday, 14 December 2017 17:16:12 UTC