On Wed, Apr 1, 2015 at 7:26 PM, Tim Guan-tin Chien <
timd...@mozilla.com> wrote:
> I wonder if the pattern of Service Worker is widely accepted and we
> should be aiming that design when designing new APIs? Or this is an
> issue remain to be settled?
The way that the JS language is going currently is definitely to use
Promises as way of sending asynchronous results and asynchronous
signals in JS APIs in general. So yes, right now I'd say it's how we
should aim to design API.
Of course, there's no way to tell that this will remain forever.
There's certainly fashions in API design. But the use of promises for
asynchronousness has very nice network effects and so my guess is that
it's something that'll stick.
/ Jonas