Skip to content

Commit

Permalink
Inject BB10 WebWorks script in bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Higgins committed Dec 14, 2012
1 parent 861ff3d commit 877fec1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/scripts/bootstrap-blackberry.js
Expand Up @@ -20,11 +20,18 @@
*/

document.addEventListener("DOMContentLoaded", function () {
var wwjs;
switch(require('cordova/platform').runtime()) {
case 'qnx':
document.addEventListener("webworksready", function () {
require('cordova/channel').onNativeReady.fire();
});
wwjs = document.createElement("script");
wwjs.type = "text/javascript";
wwjs.src = "local:///chrome/webworks.js";
wwjs.onload = function () {
document.addEventListener("webworksready", function () {
require('cordova/channel').onNativeReady.fire();
});
};
document.getElementsByTagName("head")[0].appendChild(wwjs);
break;
case 'air':
require('cordova/channel').onNativeReady.fire();
Expand Down

0 comments on commit 877fec1

Please sign in to comment.