cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benn Mapes <benn.ma...@gmail.com>
Subject Re: [cordova-js] plugin loader is not firing onPluginsReady when cordova_plugin.js's module.exports = []
Date Thu, 11 Jul 2013 23:36:12 GMT
Created an issue : https://issues.apache.org/jira/browse/CB-4187
Along with a fix : https://github.com/bennmapes/cordova-js/tree/pl-fix

If someone could confirm that this is also a problem on other platforms and
that this fixes it that would be great :)


On Thu, Jul 11, 2013 at 11:43 AM, Benn Mapes <benn.mapes@gmail.com> wrote:

> I noticed this when I was testing the geolocation plugin on windows phone.
> When no javascript is provided (moduleList.length == 0), we never seem to
> get past handlePluginsObject().
>
> This could easily be fixed by adding something like
>
> if(moduleList.length == 0) {
>         finishPluginLoading();
>  }
>
> to the handlePluginsObject funtion but I wan't sure if this was just a
> windows phone bug.
>
> Steps to reproduce:
> 1.Create a new project
> 2. create a cordova_plugins.js file in the www folder with the following
> content :
> cordova.define('cordova/plugin_list', function(require, exports, module) {
> module.exports = []
> });
> 3. Run it.
> 4. Does device ready fire?
>
> This doesn't really cause much of a problem since you don't need the
> bridge if your only using the browser implementation but it will if people
> are waiting for device ready to fire before using our APIs (recommend).
>
>
>

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