You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Nam Kim (JIRA)" <ji...@apache.org> on 2014/01/15 07:01:25 UTC

[jira] [Created] (CB-5796) Firefox OS Network Information doesn't work

Nam Kim created CB-5796:
---------------------------

             Summary: 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


{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.



Also, 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}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)