Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.3.0
-
None
Description
Issue #1:
cordova-plugin-network-information/src/firefoxos/NetworkProxy.js:ln32
var connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection;
The line above is written inside an object declaration, which causes syntax errors.
Issue #2
navigator.connection exists, but connection.bandwidth and connection.metered are undefined. We should instead be checking for mozConnection.bandwidth and mozConnection.metered.
Suggested fix:
var connection = navigator.mozConnection || navigator.webkitConnection;
Issue #3
cordova-plugin-network-information/src/firefoxos/NetworkProxy.js:ln60
require("cordova/firefoxos/commandProxy").add("Network", module.exports);});
should be
require("cordova/firefoxos/commandProxy").add("NetworkStatus", module.exports);});
Issue #4
The overridden navigator.connection.type doesn't speak Cordova interface.
I am not too familiar with Firefox OS, but just wondering if navigator.mozConnection.bandwidth is 0, it can be translated to "none" and else (if bandwidth is not 0) "unknown".