cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Grieve <agri...@chromium.org>
Subject Re: Remove onDestroy event/channel from cordova-js
Date Wed, 07 Jan 2015 02:32:35 GMT
The channel is defined here:
https://github.com/apache/cordova-js/blob/master/src/common/channel.js#L38
and clearly labeled as an internal event. I don't think it'd be considered
an API change to remove it.

On Tue, Jan 6, 2015 at 7:59 PM, Joe Bowser <bowserj@gmail.com> wrote:

> Are we sure the feature never worked? I'm not wanting to kill a feature to
> find out that it worked on Android 2.x and that we broke someone's app.  I
> think more testing is needed before we decide to kill it.
>
> On Tue Jan 06 2015 at 4:57:25 PM Jesse <purplecabbage@gmail.com> wrote:
>
> > Well, if we find that the feature never worked, then we could just remove
> > it.
> >
> > @purplecabbage
> > risingj.com
> >
> > On Tue, Jan 6, 2015 at 4:52 PM, Joe Bowser <bowserj@gmail.com> wrote:
> >
> > > This is an API change, and this would require a major version change
> for
> > > both Android and CordovaJS.
> > >
> > > On Tue Jan 06 2015 at 4:50:17 PM Shazron <shazron@gmail.com> wrote:
> > >
> > > > Fine with me (iOS has no use of it)
> > > >
> > > > On Mon, Jan 5, 2015 at 12:27 PM, Jason Chase <chasej@chromium.org>
> > > wrote:
> > > > > I'm working on CB-8210, to remove the use of javascript eval()s
> from
> > > > native
> > > > > code in cordova-android.  The goal is to pave the way for CSP.
> > > > >
> > > > > One usage was to fire the "onDestroy" event when the app is being
> > > > > destroyed.  However, in my testing, I wasn't able to get this event
> > > > firing
> > > > > on the javascript side.  Upon investigation, I discovered that
> while
> > > the
> > > > > onDestroy is defined for all platforms (in channel.js), it is only
> > > > > implemented for android.  Further, the code defines it as an
> internal
> > > > > event, which should not be used in app code (guidance is to use
> > > > > window.onunload instead).  I couldn't find any internal code using
> > > > > onDestroy.
> > > > >
> > > > > Given the above, is there any reason to keep the onDestroy event?
> It
> > > > seems
> > > > > the simplest thing to do is remove the event, rather than spending
> > more
> > > > > effort on getting it to work under CSP.  As well, it's defined as
> an
> > > > > internal event, so I assume that removal would not be considered
an
> > API
> > > > > change.
> > > > >
> > > > > I'd welcome any comments for/against removing onDestroy.
> > > > >
> > > > > Thanks,
> > > > > Jason
> > > > > Google Cordova team
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> > > > For additional commands, e-mail: dev-help@cordova.apache.org
> > > >
> > > >
> > >
> >
>

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