[ 
https://issues.apache.org/jira/browse/CB-8185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14317690#comment-14317690
 ] 

ASF GitHub Bot commented on CB-8185:
------------------------------------

GitHub user vladimir-kotikov opened a pull request:

    https://github.com/apache/cordova-plugin-network-information/pull/25

    CB-8185 Use `navigator.onLine` as connection information source on browser 
platform

    This is fix for [CB-8185](https://issues.apache.org/jira/browse/CB-8185)
    This also adds support for `online`/`offline` events for browser.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MSOpenTech/cordova-plugin-network-information 
CB-8185

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-network-information/pull/25.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #25
    
----
commit 42fbe8aa9fab76dea7b1b0b837574806871a5660
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-02-04T14:09:06Z

    CB-8185 Use `navigator.onLine` as connection information source on browser 
platform
    
    * add support for `online`/`offline` events for browser

----


> Add online and offiline plugin-network-information events support for the 
> Browser platform
> ------------------------------------------------------------------------------------------
>
>                 Key: CB-8185
>                 URL: https://issues.apache.org/jira/browse/CB-8185
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Browser, Plugin Network Information
>            Reporter: Sergey Shakhnazarov
>            Assignee: Vladimir Kotikov
>
> Initial implementation used XHR to check whether we connected to network or 
> not. Two main problems of this approach is that it used CORS and wasn't able 
> to detect local network access.
> So for better compatibility with specs it is better to use browsers native 
> implementation of {{navigator.onLine}} property which properly handles all 
> the aspects of network accessibility.
> {{navigator.onLine}} available for all modern browsers: 
> http://caniuse.com/#feat=online-status



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to