cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse <purplecabb...@gmail.com>
Subject Re: WebView Promise and W3C standards
Date Wed, 13 Aug 2014 18:05:21 GMT
I agree the polyfil should exist, and it should probably be in core.
However, I do not agree with the sentiment that 'we' should encourage their
use, 'you' may. Personally, I see more ugly code written because of
Promises than the ugly code it tries to fix.

Windows8 and Windows Phone 8 already support the Promise API because they
include WinJS.



@purplecabbage
risingj.com


On Wed, Aug 13, 2014 at 10:37 AM, Andrew Grieve <agrieve@chromium.org>
wrote:

> I'm be in favour of adding the polyfill right to cordova.js.
>
> - I'd like to use setImmediate within the Android bridge code, and
> setImmediate make up about half of the Promise polyfill code.
> - The polyfill is quite small
> - Promises are a part of ECMAScript, have been adopted by multiple
> browsers, and are being used in several up-and-coming specs (service
> workers, file)
> - If we make it a part of core, we can start encouraging devs to write
> plugins that return them.
>
>
> On Wed, Aug 13, 2014 at 8:29 AM, Michal Mocny <mmocny@chromium.org> wrote:
>
> > Libs like modernizr will polyfill Promises, but that seems heavy handed
> for
> > just this small library.
> >
> > My advice: when we want to write our first api that requires promises, we
> > create a separate plugin just for the Promise polyfill.  Then, any api
> that
> > requires Promises can depend on the polyfill plugin.  We've been using
> this
> > strategy for cca and has worked really well.
> >
> > -Michal
> >
> >
> > On Wed, Aug 13, 2014 at 4:56 AM, Axel Nennker <ignisvulpis@gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > > newer W3C standards use Promises but I think that Promises are not
> > > implemented in the WebViews Cordova currently uses.
> > >
> > > Any advise on this? How should I implement a new W3C standard in
> Cordova?
> > > Are there examples already?
> > >
> > > kind regards
> > > Axel
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message