Problem description
When calling evalJS on a webview in BB10, the javascript is invoked, but there is no return value.
Code sample
Just use this code:
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
var webview = Ti.UI.createWebView({
url : 'http://www.example.com'
});
webview.addEventListener('load', function() {
alert(webview.evalJS('window.location.href'));
});
win.add(webview);
win.open();
Note
evalJS works. Replace the alert with this to verify:
webview.evalJS('alert(window.location.href)');
The API will be the following. BB's evalJS implementation is async
PR Pending https://github.com/appcelerator/titanium_mobile_blackberry/pull/210
Closing ticket as fixed.