Skip to content

Instantly share code, notes, and snippets.

@mogya
Created February 22, 2011 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mogya/838562 to your computer and use it in GitHub Desktop.
Save mogya/838562 to your computer and use it in GitHub Desktop.
webview.evalJS cause hang-up on android #titanium?
var tabGroup = Titanium.UI.createTabGroup();
var win = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({
icon:'KS_nav_views.png',
title:'Tab 1',
window:win
});
var webview = Ti.UI.createWebView();
webview.addEventListener('load',function(e){
webview.evalJS("document.getElementById('no_such_id').innerHTML");
});
webview.url = "http://www.google.co.jp/";
win.add(webview);
tabGroup.addTab(tab1);
tabGroup.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment