B2G Wifi: trigger `onstatuschange' callbacks when the wifi status changes

RESOLVED FIXED in mozilla14

Status

()

Core
DOM: Device Interfaces
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: kaze, Assigned: mrbkap)

Tracking

(Blocks: 1 bug)

Trunk
mozilla14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
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.
(Reporter)

Updated

5 years ago
Blocks: 717123
(Assignee)

Comment 1

5 years ago
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.
Assignee: nobody → mrbkap
Status: NEW → ASSIGNED
Attachment #614702 - Flags: review?(jones.chris.g)
(Assignee)

Updated

5 years ago
Attachment #614702 - Flags: feedback?(kaze)
(Reporter)

Comment 2

5 years ago
>+     *   - 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
(Reporter)

Comment 3

5 years ago
Here’s a preliminary front-end:
https://github.com/andreasgal/gaia/pull/1226
Attachment #614702 - Flags: review?(jones.chris.g) → review+
(Reporter)

Updated

5 years ago
Attachment #614702 - Flags: feedback?(kaze) → feedback+
https://hg.mozilla.org/integration/mozilla-inbound/rev/1d3aea7115d3
OS: Linux → All
Hardware: x86 → All
Target Milestone: --- → mozilla14

Comment 5

5 years ago
https://hg.mozilla.org/mozilla-central/rev/1d3aea7115d3
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.