Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3AC91DA03 for ; Tue, 4 Sep 2012 15:16:10 +0000 (UTC) Received: (qmail 53698 invoked by uid 500); 4 Sep 2012 15:16:08 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 53650 invoked by uid 500); 4 Sep 2012 15:16:08 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 53487 invoked by uid 99); 4 Sep 2012 15:16:08 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2012 15:16:08 +0000 Date: Wed, 5 Sep 2012 02:16:08 +1100 (NCT) From: "Andrew Grieve (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <223679219.33030.1346771768478.JavaMail.jiratomcat@arcas> Subject: [jira] [Created] (CB-1368) Move navigator.connection.network interface to navigator.network and make navigator.onLine be based off of network type. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Andrew Grieve created CB-1368: --------------------------------- Summary: Move navigator.connection.network interface to navigator.network and make navigator.onLine be based off of network type. Key: CB-1368 URL: https://issues.apache.org/jira/browse/CB-1368 Project: Apache Cordova Issue Type: Bug Components: CordovaJS Reporter: Andrew Grieve Assignee: Andrew Grieve Priority: Minor Fix For: 2.2.0 According to: http://www.w3.org/TR/netinfo-api/ navigator.connection.network should actually be navigator.network. The difficulty before was figuring out how to clobber navigator's own properties with our own, but the following code can be used to achieve this: function ClassWithNavigatorAsPrototype() {} ClassWithNavigatorAsPrototype.prototype = navigator; var newNavigator = new ClassWithNavigatorAsPrototype(); This also allows us to set a consistent onLine property: newNavigator.__defineGetter__('onLine', function() { return this.network.type != 'none'; }); -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira