cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Bowser <>
Subject Bridges as Plugins: MozillaView update
Date Thu, 20 Nov 2014 19:41:36 GMT

I've managed to get the old monolithic version of Mobile-Spec working with
MozillaView, and right now I'm running in to a serious problem with my
current approach to adding the GeckoView engine as a plugin, which is that
I had to re-write exec to get this to work with the bridge provided by

Right now, I have the majority of the code pluginized here:

And this is based on this example project here:

And requires this feature branch of Cordova JS to run:

What I'm thinking of doing is have plugin code that overrides the exec so
that it uses the new bridge instead of the old bridge.  Right now we only
have the bridge that Mozilla implemented working right now, and we don't
have the prompt mechanism implemented for BridgeSecret.  I also want to
revisit our method for encoding what comes out, since it seems weird that
we can't have base64 strings in JSON, since that's really how we're passing
Binary Data out of Cordova anyway.

I have to admit that the last part, getting the exec scripts to work has
been a huge slog in comparison to everything else.  Given that there's so
many people active in CordovaJS, you'd think this would be documented a lot
better than it currently is.  Right now I'm re-using the message encoding
that Android is using so that I can get this working and in front of people.

Anyway, thoughts on how to load exec as a plugin would definitely be
useful.  This is the main blocker for me getting this over the finish line.


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