On Dec 3, 2012 7:42 PM, "Andrew Grieve" <agri...@chromium.org> wrote:
>
> I don't really understand using cordova.js outside of Cordova. There's one
> for every platform, so which one gets included in the web version?

In the Wikipedia app we have a single codebase for several platforms and
load the appropriate Cordova.js (if any) based on the detected user-agent.
So in a browser, we don't load any Cordova.js.

Basically what I think is needed is a way to check if we *should* load a
Cordova.js, and if so which one.

Currently we take a shortcut and assume anything on Android or iOS is
running in the Cordova app.

The primary alternative is maybe to use a build system that adds in the
platform-specific files when packaging apps, while keeping your source tree
runnable in a browser...

-- brion

Reply via email to