following bug 740079 To get along with the synchronous `status' property, it would be nice to support `onstatuschange' callbacks. There are a few use cases where this would be easier than a set of onconnect / onconnecting / ondisconnect / etc. event listeners and it would be more XHR-like.
Created attachment 614702 [details] [diff] [review] Patch v1 This should be pretty straightforward. The one thing I wondered about was whether it was worth it to change the internal (IPC) notifications to follow the DOM API. I decided against it since not all of the notifications did exactly the same thing (in particular, disconnect is handled a little differently). Any opinions on that would be welcome.
>+ * - disconnected: Fires when we either fail to connect to an access >+ * point (transition: onassociate -> ondisconnect) or >+ * when we were connected to a network but have >+ * disconnected for any reason (transition: onconnect -> >+ * ondisconnect). nit: transition: associated -> disconnected transition: connected -> disconnected
Here’s a preliminary front-end: https://github.com/andreasgal/gaia/pull/1226