[TIMOB-16781] BlackBerry: TiUIWebview does not return evalJS data
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2014-04-01T00:37:31.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | BlackBerry |
Labels | Blackberry, WebView, evalJs |
Reporter | Ketan Majmudar |
Assignee | Mostafizur Rahman |
Created | 2014-01-30T00:05:47.000+0000 |
Updated | 2014-04-01T00:37:31.000+0000 |
Description
Issue
EvalJS does not return data to the app:Test case
Using a simple Alloy app: index.xml
<Alloy>
<Window>
<WebView top="150" id="webContent" width="300px" height="300px" borderColor="red"
borderWidth="2px" url="http://www.google.com"></WebView>
</Window>
</Alloy>
Controller: index.js
function checkState(e) {
var webTitle = $.webContent.evalJS('document.title');
$.webContent.evalJS("alert(document.title)");
alert(webTitle);
}
$.webContent.addEventListener('load', checkState);
$.index.open();
One alert works (As its triggered from within the webview), the second fails as it does not pass back to the controller.
Attachments
File | Date | Size |
---|---|---|
TC-3675-BlackBerry_FirstAlert.png | 2014-03-28T03:28:37.000+0000 | 81777 |
TC-3675-BlackBerry_SecondAlert.png | 2014-03-28T03:28:37.000+0000 | 71677 |
TC-3675-iOS_FirstAlert.png | 2014-03-28T03:28:37.000+0000 | 49600 |
TC-3675-iOS_SecondAlert.png | 2014-03-28T03:28:37.000+0000 | 54715 |
No comments