Closed Bug 745114 Opened 13 years ago Closed 13 years ago

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

Categories

(Core :: DOM: Device Interfaces, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: kaze, Assigned: mrbkap)

References

Details

Attachments

(1 file)

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.
Blocks: b2g-wifi
Attached patch Patch v1 (deleted) — Splinter Review
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)
Attachment #614702 - Flags: feedback?(kaze)
>+ * - 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
Attachment #614702 - Flags: review?(jones.chris.g) → review+
Attachment #614702 - Flags: feedback?(kaze) → feedback+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: