blackberry / WebWorks-Community-APIs

Community owned repository containing JavaScript Extensions for BlackBerry WebWorks
Apache License 2.0
140 stars 204 forks source link

Remove use of Synchronous function calls in Template #410

Closed timwindsor closed 9 years ago

timwindsor commented 9 years ago

Current Template generator creates a lot of Synchronous function calls as these are viable in BlackBerry 10, but which cause problems on other platforms. These calls should be updated to use callbacks.

For example, this is problematic code: https://github.com/blackberry/generator-cordova-plugin-bb10/blob/master/generators/app/templates/plugin/www/client.js#L27-L35

A better approach is to do similar to the code in PreventSleep: https://github.com/blackberry/WebWorks-Community-APIs/blob/master/BB10-Cordova/PreventSleep/plugin/www/client.js

timwindsor commented 9 years ago

Fixed by https://github.com/blackberry/generator-cordova-plugin-bb10/pull/1