Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (evaljs)
Viewing all articles
Browse latest Browse all 83

WebView TiMobile 3.0 evalJS() don't work

$
0
0

Hi, I'm using Titanium 3.1 and Ti SDK 3.0.GA. I'm trying to execute a JS function like document.title but return null:

function parseHTML(source, code, callback) {
        var webview = Ti.UI.createWebView({
            html : source
        });
        callback(webview.evalJS(code));
    }
 
var html; // alert(html) returns the page
 
parseHTML(html, "document.title", function(resp){
    alert(str); // alert in screen = ""
});
What am I doing wrong?

Thanks!


Viewing all articles
Browse latest Browse all 83

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>