cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeffrey Heifetz (JIRA)" <>
Subject [jira] [Comment Edited] (CB-5196) BB10 invoke() plugin is shadowded by cordova.js
Date Thu, 24 Oct 2013 19:28:04 GMT


Jeffrey Heifetz edited comment on CB-5196 at 10/24/13 7:27 PM:

Use the cordova 3.0 compatible plugin -

If you do this the balckberry.invoke APIs will be added automatically no modification to the
framework or config.xml should be necessary

was (Author: jeffheifetz):
Use the cordova 3.0 compatible plugin -

> BB10 invoke() plugin is shadowded by cordova.js
> -----------------------------------------------
>                 Key: CB-5196
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: BlackBerry
>    Affects Versions: 3.1.0
>         Environment: Blackberry 10
>            Reporter: Mike Billau
>         Attachments: bbInvoke.html
> Our users need to invoke blackberry.invoke.invoke().  As per WebWorks doc, to call any
BB API, webworks.js needs to be included in the html file. 
> The problem is that there does not seem to be a way to call invoke():
> 1. Create a simple BB10 app using the attached HTML file,
> 2. Add feature to the config.xml: <feature id="blackberry.invoke" name="blackberry.invoke"
> 3. Run the app. Press the button; the browser window doesn't open.
> 4. Edit the HTML file and place the cordova.js script before webworks.js script
> 5. Run the app again, and there is a popup saying: "Error intializing cordova:undefined".
After dismissing the alert, you can press the button and the browser opens just fine.
> "Analysis:
> Internally blackberry.invoke.invoke() ('invoke' plugin) calls *window.webworks.event.isOn()*
in blackberry.invoke/client.js. This is where the problem is: *window.webworks* is defined
in both cordova.js and webworks.js.The one in cordova.js doesn't have 'event' function whereas
it is available in window.webworks of webworks.js. Hence when webworks.js is loaded after
cordova.js, it works fine and not if it is reversed."
> Even though it works when we put webworks.js first we need to squash the alert() and
make sure cordova initializes correctly.

This message was sent by Atlassian JIRA

View raw message