incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gord Tanner <>
Subject Re: online events
Date Fri, 31 Aug 2012 20:02:04 GMT
I found something simular to this on BB10:

Events were fired on window, but our docs show they are fired on the
document.  Just proxy'ed them for now.

On Fri, Aug 31, 2012 at 3:49 PM, Andrew Grieve <> wrote:
> It looks like there is code in network.js that fire online & offline events
> when the network status changes. On any platform that already supports
> online events, the browser will fire an event, and then the network plugin
> will also fire an event.
> There is also the fact that the event is fired only on document. The spec
> says that listening on window should work as well (as well as
> document.body):
> I made a test page:
> Running it on android browser shows that the only two listener methods that
> work are:
>  -window.addEventListener
>  -document.body.ononline =
> So, clearly it's a bit broken. I'm wondering though, if we should do some
> clean-up with these events.
> Options:
> 1. Live with duplicate events for browsers that support them, but also fire
> them on document.body and window.
> 2. Don't fire online/offline events from this plugin. Fire a custom
> "networktypechange" event
> 3. Intercept all event registration an window/document/body so that the
> browser's native events don't take effect. Have the only source of these
> events be the network plugin.
> Votes? Comments?

Gord Tanner
Senior Developer / Code Poet
tinyHippos Inc.

View raw message