[Interest] WebVuew::runJavaScript problems

Jason H jhihn at gmx.com
Thu Aug 23 05:56:40 CEST 2018


I'm trying to load and get a variable that is changed by the page.
webview.runJavaScript("testResult", function(result){
	console.log('webview result', result);
});

The html is 
<html>
	<script language ="javascript">
	var testResult="xxxx";
	</script>
	<body>

	</body>
</html>

But the output is:
qml: webview result undefined

What am I doing wrong?



More information about the Interest mailing list