cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gord Tanner <>
Subject CommandProxy and misbehaving plugins
Date Tue, 29 Oct 2013 04:09:30 GMT
Hey everyone,

Long time no commit but I was working on getting cordova 3.X support
working in ripple (really really close and about to release it) but I saw
some weird stuff in some of the plugins.

In the vibration plugin the base javascript calls into the cordova exec
module [1] and does all the work in the native layer, which is perfect.

BlackBerry 10 overrides the base javascript with their own implementation
that just delegates this to navigator.vibrate [2].  This isn't a unique
problem as firefox does the same thing but handles it behind the exec layer

It would be nice if we could keep each platform as close to being the same
as possible and diverge behind the exec layer (like firefox does).

I saw that windows8 and firefox both have a commandProxy that they use to
add in services and actions for the "native" layer.  I moved this to a
common plugin [4] (since it was duplicated anyway).

Now that this is a common plugin we can use it to override and add in
"native" modules so that BlackBerry and other platforms don't need to
diverge at the javascript API layer making it harder to emulate.

[1] -
[2] -
[3] -
[4] -;a=commitdiff;h=c6817556d90cc4e500c4f480b6e106b1b52d3002

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