Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8347F10195 for ; Fri, 6 Sep 2013 20:33:32 +0000 (UTC) Received: (qmail 5163 invoked by uid 500); 6 Sep 2013 20:33:32 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 5043 invoked by uid 500); 6 Sep 2013 20:33:32 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 5035 invoked by uid 99); 6 Sep 2013 20:33:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Sep 2013 20:33:31 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of simon.macdonald@gmail.com designates 209.85.128.173 as permitted sender) Received: from [209.85.128.173] (HELO mail-ve0-f173.google.com) (209.85.128.173) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Sep 2013 20:33:26 +0000 Received: by mail-ve0-f173.google.com with SMTP id cz12so2011828veb.32 for ; Fri, 06 Sep 2013 13:33:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=GszTdukHeM6//tjjGclEt4k7CQrQqhQCMBc28KvcsDM=; b=J/ix2WyYk6NNnRb3naWOmmuQ4FyKZj8nW+dyurxt1OYOFS6K/RhXdVd0jhxS/6yrt4 hHOhaaJkw85vMXK4ZUMks6TYPU9dA3iAAZxc8oCEDpL6cf6tgKGHyTfwiHF7F/f8x3ve Ko6iSe4amGQFlM0hcw4UvA684p9cbOsfCizEcpOvGKQydgynmz/wxmi9a8X+B52SipUO gi1kttXFAP1TMegSBFKrM86mpURt4HPGXYOGt+qjxdX3Ndkuft29zGevlua/aJIegSrS xp4fVLajTLfoOFVSvNZ53YVv9EhZ6p3n0w5yhe+q/nY2DmamzqS0AkzXZMKl2Ep8ewEb IW2Q== X-Received: by 10.220.164.70 with SMTP id d6mr3999027vcy.19.1378499585340; Fri, 06 Sep 2013 13:33:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.188.14 with HTTP; Fri, 6 Sep 2013 13:32:45 -0700 (PDT) In-Reply-To: References: From: Simon MacDonald Date: Fri, 6 Sep 2013 16:32:45 -0400 Message-ID: Subject: Re: Adding cordova.platform property To: "dev@cordova.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org +1 I think it is a great idea just don't take it out of device until we sit on it for 6 months and forget to tell people we are removing it. Not that we'd ever do that. Simon Mac Donald http://hi.im/simonmacdonald On Fri, Sep 6, 2013 at 3:46 PM, Ian Clelland wrote: > I brought this up on another thread, but I can't find any reference to the > issue in JIRA, so I'm starting a new thread for visibility. > > Since cordova-plugin-device was removed from core, and is now an optional > plugin, there is no easy way to determine at runtime what platform an app > is running on. (And yes, feature detection is usually better than > user-agent detection, but there are legitimate reasons for switching on the > *cordova* platform as opposed to any particular feature available in the > webview) > > I'd like to make this property available as `cordova.platform; it would be > a simple string taken from the 'id' defined in > cordova-js/lib//platform.js. > > Are there any objections to attaching this to the cordova namespace? > > Ian