[
https://issues.apache.org/jira/browse/CB-5796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nam Kim updated CB-5796:
------------------------
Description:
h4. Issue #1:
{code:javascript|title=cordova-plugin-network-information/src/firefoxos/NetworkProxy.js:ln32}
var connection = navigator.connection || navigator.mozConnection ||
navigator.webkitConnection;
{code}
The line above is written inside an object declaration, which causes syntax
errors.
h4. 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:
{code:javascript}
var connection = navigator.mozConnection || navigator.webkitConnection;
{code}
h4. Issue #3
{code:javascript|title=cordova-plugin-network-information/src/firefoxos/NetworkProxy.js:ln60}
require("cordova/firefoxos/commandProxy").add("Network", module.exports);});
{code}
should be
{code:javascript}
require("cordova/firefoxos/commandProxy").add("NetworkStatus",
module.exports);});
{code}
was:
h4. Issue #1:
{code:javascript|title=cordova-plugin-network-information/src/firefoxos/NetworkProxy.js}
var connection = navigator.connection || navigator.mozConnection ||
navigator.webkitConnection;
{code}
The line above is written inside an object declaration, which causes syntax
errors.
h4. 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:
{code:javascript}
var connection = navigator.mozConnection || navigator.webkitConnection;
{code}
h4. Issue #3
{code:javascript|title=cordova-plugin-network-information/src/firefoxos/NetworkProxy.js:ln60}
require("cordova/firefoxos/commandProxy").add("Network", module.exports);});
{code}
should be
{code:javascript}
require("cordova/firefoxos/commandProxy").add("NetworkStatus",
module.exports);});
{code}
> Firefox OS Network Information doesn't work
> -------------------------------------------
>
> Key: CB-5796
> URL: https://issues.apache.org/jira/browse/CB-5796
> Project: Apache Cordova
> Issue Type: Bug
> Components: FirefoxOS, Plugin Network Information
> Affects Versions: 3.3.0
> Reporter: Nam Kim
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> h4. Issue #1:
> {code:javascript|title=cordova-plugin-network-information/src/firefoxos/NetworkProxy.js:ln32}
> var connection = navigator.connection || navigator.mozConnection ||
> navigator.webkitConnection;
> {code}
> The line above is written inside an object declaration, which causes syntax
> errors.
> h4. 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:
> {code:javascript}
> var connection = navigator.mozConnection || navigator.webkitConnection;
> {code}
> h4. Issue #3
> {code:javascript|title=cordova-plugin-network-information/src/firefoxos/NetworkProxy.js:ln60}
> require("cordova/firefoxos/commandProxy").add("Network", module.exports);});
> {code}
> should be
> {code:javascript}
> require("cordova/firefoxos/commandProxy").add("NetworkStatus",
> module.exports);});
> {code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)