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 A15A510108 for ; Mon, 26 May 2014 17:37:20 +0000 (UTC) Received: (qmail 12051 invoked by uid 500); 26 May 2014 17:37:20 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 12016 invoked by uid 500); 26 May 2014 17:37:20 -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 12005 invoked by uid 99); 26 May 2014 17:37:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 May 2014 17:37:20 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mhweiner234@gmail.com designates 74.125.82.178 as permitted sender) Received: from [74.125.82.178] (HELO mail-we0-f178.google.com) (74.125.82.178) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 May 2014 17:37:16 +0000 Received: by mail-we0-f178.google.com with SMTP id u56so8274440wes.37 for ; Mon, 26 May 2014 10:36:54 -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=KCShPysbZXH25eggxl4xyamEjkvEF7Mv0a+QFkYV8mE=; b=ORH4/Hs4GQHZRC98ZJL7DzbjVHgCb9VBvk/f5fySa7MDfyE27mn8VkxXOwb+sItdkA mtM54glWiQmQSKovPYWMRqAJXl97oWmavE7pdZs5/EvGFItdHnEBEur7NDzDghm8jyto hlkYYGdVgc0XpjNgpg1ZegIiq2JqyHe9N0JtmYqEY14Sj5notqkXniZU8cDvLTOC711p kwmzoMqz6RPTP7YqkCekhtHDeYbTBFmyq7KnujqVCQpCP9I+nn5V6Ep2Cn29A7yHSUfD mQEleH9JdDTuL5YaPi6bnIYe37nOsOANSddiZZpAwzmRjoM2kkNCAiEZWuTHDhlOFhXQ f2DQ== X-Received: by 10.180.72.136 with SMTP id d8mr29496229wiv.36.1401125814761; Mon, 26 May 2014 10:36:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.103.227 with HTTP; Mon, 26 May 2014 10:36:34 -0700 (PDT) In-Reply-To: References: From: Marc Weiner Date: Mon, 26 May 2014 13:36:34 -0400 Message-ID: Subject: Re: Android: Deprecate WebView.sendJavascript()? To: dev Content-Type: multipart/alternative; boundary=f46d043be224797ebb04fa51068a X-Virus-Checked: Checked by ClamAV on apache.org --f46d043be224797ebb04fa51068a Content-Type: text/plain; charset=UTF-8 +1 for deprecation sooner and removal in 4.0. Might as well break everything at once. Doesn't sound like it's in the spirit of Cordova. On Mon, May 26, 2014 at 1:16 PM, Michal Mocny wrote: > Should we write a plugin that must be installed along with cordova-android > that does the suggested "sendJavascript via PluginResults" and swap the > implementation on native-side? > > -Michal > > > On Mon, May 26, 2014 at 1:02 PM, Ian Clelland >wrote: > > > It's probably a good candidate for removal in the 4.0 branch, if we > really > > don't want to support it > > > > > > On Mon, May 26, 2014 at 12:59 PM, Andrew Grieve > > wrote: > > > > > From: https://issues.apache.org/jira/browse/CB-6746 > > > > > > It's a fairly common anti-pattern to use sendJavascript() to > communicate > > > with native side. Not sure if deprecating the call is the right move, > but > > > wanted to pitch the idea. > > > > > > There are multiple pitfalls: > > > 1. As in the bug, it doesn't work if cordova.js isn't loaded yet > > > 2. It's ripe for escaping bugs > > > 3. It's less performant than using PluginResults > > > > > > Given that you can implement sendJavascript via PluginResults by just > > > eval()ing the results, maybe we could just deprecate the function? > > > > > > --f46d043be224797ebb04fa51068a--