Closed
Bug 517873
Opened 16 years ago
Closed 7 years ago
Detect offline status change
Categories
(Mozilla Labs :: Prism, defect)
Mozilla Labs
Prism
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: matthew.gertner, Assigned: matthew.gertner)
Details
Attachments
(1 file)
It should be possible for Prism apps to detect when the network connection goes down/up and take appropriate action. They can theoretically do this already by observing the "network:offline-status-changed" topic, but this is complicated and inconvenient to do from content.
| Assignee | ||
Comment 1•16 years ago
|
||
Attachment #401836 -
Flags: review?(mark.finkle)
| Assignee | ||
Comment 2•16 years ago
|
||
Comment on attachment 401836 [details] [diff] [review]
Add a method to platform glue to register a callback for offline status changes
Mark pointed out that existing DOM events are probably sufficient for this purpose (see https://developer.mozilla.org/En/Online_and_offline_events).
Jason, JJ: Can you confirm that the DOM events fill your requirements?
Attachment #401836 -
Flags: review?(mark.finkle)
Matt, Mark,
We actually deliberately prevent Prism from going into offline mode by setting Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService).offline=false. As you know we run Prism to point to localhost. If Prism actually switches into offline mode it won't even connect to localhost.
So we have two choices here. Either that a lower level network status detection api can be accessible by our app without actually taking the browser offline, or make make it still work with localhost even if browser is offline.
Thanks!
| Assignee | ||
Comment 4•16 years ago
|
||
JJ, since you are forcing Prism to stay online and connecting to localhost, why do you need to know when the network connection goes down? I'm trying to think of the best solution, and I want to make sure that I understand the use case.
So that we can decide whether we should enable/disable services dependent on internet in our app accordingly. when internet connectivity is down, we still have localhost connectivity to provide basic service; when internet is up, we can enable additional services.
Comment 6•7 years ago
|
||
Prism isn't maintained anymore. Mass closing of the bugs.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•