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)

Reply via email to