Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16781] BlackBerry: TiUIWebview does not return evalJS data

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionDuplicate
Resolution Date2014-04-01T00:37:31.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsBlackBerry
LabelsBlackberry, WebView, evalJs
ReporterKetan Majmudar
AssigneeMostafizur Rahman
Created2014-01-30T00:05:47.000+0000
Updated2014-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

FileDateSize
TC-3675-BlackBerry_FirstAlert.png2014-03-28T03:28:37.000+000081777
TC-3675-BlackBerry_SecondAlert.png2014-03-28T03:28:37.000+000071677
TC-3675-iOS_FirstAlert.png2014-03-28T03:28:37.000+000049600
TC-3675-iOS_SecondAlert.png2014-03-28T03:28:37.000+000054715

Comments

No comments

JSON Source