Codeviews
Codeviews

Reputation: 111

WinRT webview go back?

I'm trying to get the webview to go back but I'm having a little problem. Here is my code:

Blog.InvokeScript("eval", new[] { "history.go(-1)" });

The error says use InvokeScriptAsync.. How do I go about doing that? Sorry, I'm new to programming.

Also will the same code work for going forward? ( instead of -1, use +1)?

Upvotes: 0

Views: 160

Answers (2)

Martin Konopka
Martin Konopka

Reputation: 391

The WebView comes with GoBack method. Does it not work for you?

Upvotes: 0

Paulo Morgado
Paulo Morgado

Reputation: 14846

Whit the little context you gave, I can only speculate:

WebView.InvokeScriptAsync method

async Task SomeMethod()
{
    await Blog.InvokeScript("eval", new[] { "history.go(-1)" }); 
}

History go() Method

Upvotes: 2

Related Questions