summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.WinRT/WebViewRenderer.cs
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2016-04-25 16:26:40 (GMT)
committerRui Marinho <me@ruimarinho.net>2016-04-25 16:26:40 (GMT)
commit6c0c11960b26c4ccb3322fec04e0eb6f55d9da07 (patch)
tree2cd4f17c98a2edb8bf3ecb6a8612f2774f3db294 /Xamarin.Forms.Platform.WinRT/WebViewRenderer.cs
parentee5654f8fe4f15817a8bd23e0613a6d0f9d4c9ec (diff)
downloadxamarin-forms-6c0c11960b26c4ccb3322fec04e0eb6f55d9da07.zip
xamarin-forms-6c0c11960b26c4ccb3322fec04e0eb6f55d9da07.tar.gz
xamarin-forms-6c0c11960b26c4ccb3322fec04e0eb6f55d9da07.tar.bz2
Prep WebView and renderers for removal of InternalsVisibleTo (#120)
* Create custom event args class for script eval requests Make IWebViewRenderer public * Add IWebViewRenderer docs * Add EvalRequested docs * Move EvalRequested to Internals IWebViewRenderer -> IWebViewDelegate * Add docs
Diffstat (limited to 'Xamarin.Forms.Platform.WinRT/WebViewRenderer.cs')
-rw-r--r--Xamarin.Forms.Platform.WinRT/WebViewRenderer.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Xamarin.Forms.Platform.WinRT/WebViewRenderer.cs b/Xamarin.Forms.Platform.WinRT/WebViewRenderer.cs
index 75ca240..78d69ab 100644
--- a/Xamarin.Forms.Platform.WinRT/WebViewRenderer.cs
+++ b/Xamarin.Forms.Platform.WinRT/WebViewRenderer.cs
@@ -2,6 +2,7 @@
using System.ComponentModel;
using Windows.UI.Core;
using Windows.UI.Xaml.Controls;
+using Xamarin.Forms.Internals;
#if WINDOWS_UWP
@@ -11,7 +12,7 @@ namespace Xamarin.Forms.Platform.UWP
namespace Xamarin.Forms.Platform.WinRT
#endif
{
- public class WebViewRenderer : ViewRenderer<WebView, Windows.UI.Xaml.Controls.WebView>, IWebViewRenderer
+ public class WebViewRenderer : ViewRenderer<WebView, Windows.UI.Xaml.Controls.WebView>, IWebViewDelegate
{
WebNavigationEvent _eventState;
bool _updating;
@@ -94,9 +95,9 @@ namespace Xamarin.Forms.Platform.WinRT
UpdateCanGoBackForward();
}
- async void OnEvalRequested(object sender, EventArg<string> eventArg)
+ async void OnEvalRequested(object sender, EvalRequested eventArg)
{
- await Control.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () => await Control.InvokeScriptAsync("eval", new[] { eventArg.Data }));
+ await Control.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () => await Control.InvokeScriptAsync("eval", new[] { eventArg.Script }));
}
void OnGoBackRequested(object sender, EventArgs eventArgs)