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 20F1219DED for ; Thu, 14 Apr 2016 20:59:44 +0000 (UTC) Received: (qmail 47668 invoked by uid 500); 14 Apr 2016 20:59:39 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 47632 invoked by uid 500); 14 Apr 2016 20:59:38 -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 47620 invoked by uid 99); 14 Apr 2016 20:59:38 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Apr 2016 20:59:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 2FB03C0C72 for ; Thu, 14 Apr 2016 20:59:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id CwmD3m00kEeU for ; Thu, 14 Apr 2016 20:59:36 +0000 (UTC) Received: from mail-ig0-f169.google.com (mail-ig0-f169.google.com [209.85.213.169]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 37ED95F39B for ; Thu, 14 Apr 2016 20:59:35 +0000 (UTC) Received: by mail-ig0-f169.google.com with SMTP id gy3so3942818igb.0 for ; Thu, 14 Apr 2016 13:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=lo/JBsdAkng5oAeQZY+cKOvV3+JvMNE3ucizoo53nq4=; b=MLO2g+n/qm7PbaicfOWJHnDkacZrSo96WRcmkowo+e3Ksxg3x8r3euWXeyEx1y/UyW uJPuLASKsD7C1t9HFeFDeecEOhfGDTPduw9gkiYqrrYNEhcohICFDbf/dWjfgWyaaYHv MhvCIcEcIdDs6FPfa5Xw5Yc8Ong6aS6mGSmmj3vuwcNT6cbDvsz6JyBQ7mfuCerJCTIh NWKS1sjGZmcBa1/s5Djrk5Qg0S+lhzOyeeyBCe1KYw1d9Inz62JJewk8YZmhSbTv52PW kl9o3Gzrmxm3vTjdr5CwA1ZaxAY/NqHudXJhYsIfgr/jySr29HuXEvcNmAcS22QiVkGE 3b+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=lo/JBsdAkng5oAeQZY+cKOvV3+JvMNE3ucizoo53nq4=; b=Vl3v6XPDcgW5p3NoXAYlFYAW+K/HYC8X8TmHc69OrjWsJ3MFWy7ia3McnnmgBTB25G phnlcEZB8Og31j17x9jt97S8IibvIM/096daF3NGY2uqPgwymNeiLDCSzFzsLRF54bs0 3dukB/g3f/OIrC4RrAW5sMA+trgnsrgAGZuq3EJiNbYvwufKwmbQYdcjsJYpRPnXNouH 1JOoqeGPxaUXQ6hN7qw5sazIBNUCPvG2ELLmakcUgW7A2T8ZXmKcke+AQ91PzkQGI3Ls HjrjOc+96QZU86EbPiIKaZEd3P2fcJbqTYkS6hpDCOlguiA1WdxQJ8sQ7nZBzwZrCKY9 57RA== X-Gm-Message-State: AOPr4FXN1vPJ4F2RLJbbwgy1GCs7fzhTfqOGSYgSFL10HqYFYigRgRk8GjEH03GcUcy837WpJuXCgrYvQNryQA== MIME-Version: 1.0 X-Received: by 10.50.131.199 with SMTP id oo7mr789720igb.22.1460667574169; Thu, 14 Apr 2016 13:59:34 -0700 (PDT) Received: by 10.107.24.129 with HTTP; Thu, 14 Apr 2016 13:59:34 -0700 (PDT) In-Reply-To: References: Date: Thu, 14 Apr 2016 13:59:34 -0700 Message-ID: Subject: Re: Why does the Dialogs plugin in inject itself into navigator and has no browser support? From: Jesse To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=047d7b2e1505e4badd0530782ba4 --047d7b2e1505e4badd0530782ba4 Content-Type: text/plain; charset=UTF-8 Notification pre-dates the use of plugin namespaces, most plugins originally were hung off of navigator when a standard did not exist. The notification plugin used to include things like displaying a loading spinner, or vibrating the device, so it was much more about 'notifying' than strictly dialogs. The problem with alert on various platforms is it is not consistent. It does not even exist on windows, it displays a title of 'index.html' on iOS, ... The additions for browser are coming, or you could do it and send a pr ;) Cheers, Jesse @purplecabbage risingj.com On Thu, Apr 14, 2016 at 12:25 AM, Philipp Kursawe wrote: > Hello, > > sometimes I wonder the historical reasons why certain cordova plugins > choose to inject themself into "navigator" instead of their own namespace > or remain at cordova.plugins.. > For things where a native browser spec exists or is proposed like > "geolocation" it makes sense. Then you can just code against the native > browser API and when running on a device, that does not have this native > support the Cordova geolocation plugin poly-fills that behaviour. > > I recently came across the "Dialogs" plugin which uses > "navigator.notifications" and I wonder why? > Why not "navigator.dialogs"? So I checked, maybe there is a W3C spec for > browser notifications. There isn't. > > What is also interesting, that while browser have native support for alert > and prompt at the window level, the plugin neither polyfills them nor > provides any browser support at all. > > One could just write the application with "window.alert()" and on mobile > devices the plugin would polyfill this behaviour. > > Any insides in the though process of those decisions? > > Thanks a lot! > > Phil > --047d7b2e1505e4badd0530782ba4--