cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Mocny <mmo...@chromium.org>
Subject Re: Android: Deprecate WebView.sendJavascript()?
Date Mon, 26 May 2014 17:16:57 GMT
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 <iclelland@chromium.org>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 <agrieve@chromium.org>
> 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?
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message