var window = Ti.UI.currentWindow;
var webView = Ti.UI.createWebView({url :'http://localhost:3000/test.html'});
webView.addEventListener('load', function() {
var r = webView.evalJS('add(3, 2);');
alert(r);
});
window.add(webView);
test.html
<html>
<head>
<script type="text/javascript">
function add(a, b) {
return a + b;
}
</script>
</head>
<body>
</body>
</html>
動いた。