cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shazron <shaz...@gmail.com>
Subject Re: InAppBrowser - events
Date Thu, 22 Nov 2012 04:30:59 GMT
Great! Let's stick with one API, since we have Chrome members on the
Cordova team the choice is obvious :)


On Wed, Nov 21, 2012 at 8:06 PM, Andrew Grieve <agrieve@chromium.org> wrote:

> Looks that way. Given how similar they are, I don't think it matters which
> one we go with (or if we come up with our own event names), but it'd be
> good to follow the same pattern of having events and an API like
> canGoBack(), goForward(), etc. If they ever move to standardize, then we
> can follow suit.
>
>
> On Wed, Nov 21, 2012 at 7:18 PM, Shazron <shazron@gmail.com> wrote:
>
> > Mozilla's 'locationchange' is similar to what we have for ChildBrowser,
> but
> > I don't see the equivalent in the Chrome example - I suppose it is
> > 'loadstop'?
> >
> > I suppose if we were to adopt either, it would go something like this:
> >
> > var iab = window.open('http://apache.org', '_blank');
> > // Firefox
> > iab.addEventListener('locationchange', handleLocationChange);
> > // Chrome
> > iab.addEventListener('loadstop', handleLoadStop);
> >
> > // Firefox
> > function handleLocationChange(e) {
> >      console.log('location changed to: ' + e.detail);
> > }
> > // Chrome
> > function handleLoadStop(e) {
> >      console.log('location changed to: ' + e.url);
> > }
> >
> > On Wed, Nov 21, 2012 at 1:32 PM, Andrew Grieve <agrieve@chromium.org>
> > wrote:
> >
> > >
> > >
> >
> https://github.com/GoogleChrome/chrome-app-samples/blob/master/browser/browser.js
> >
>

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