You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Benn Mapes <be...@gmail.com> on 2013/07/11 20:43:47 UTC
[cordova-js] plugin loader is not firing onPluginsReady when
cordova_plugin.js's module.exports = []
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).
Re: [cordova-js] plugin loader is not firing onPluginsReady when
cordova_plugin.js's module.exports = []
Posted by Benn Mapes <be...@gmail.com>.
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 <be...@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).
>
>
>