user3624810
user3624810

Reputation: 127

windows phone 8.1 invokescript

In Windows Phone 8 you could use:

(string)browser.InvokeScript("eval", "document.title.toString()"); 

to return page title from browser.

How would you go about doing this in the new WP8.1's API

Upvotes: 1

Views: 1585

Answers (2)

user3624810
user3624810

Reputation: 127

For anyone looking for the answer I got it to work using

string[] args = { "document.title;" };
string foo = await webView.InvokeScriptAsync("eval", args);

Upvotes: 9

ad1Dima
ad1Dima

Reputation: 3197

InvokeScript is still supported in silverlight for windows phone 8.1

Upvotes: 0

Related Questions