private void Web_OnNavigationStarting(WebView sender, WebViewNavigationStartingEventArgs args) { // WebView native object must be inserted in the OnNavigationStarting event handler KeyHandler winRTObject = new KeyHandler(); // Expose the native WinRT object on the page's global object Web.AddWebAllowedObject("NotifyApp", winRTObject); }
private void Web_OnNavigationStarting(WebView sender, WebViewNavigationStartingEventArgs args) { // WebView native object must be inserted in the OnNavigationStarting event handler AppNotify appNotify = new AppNotify(); appNotify.NotifyAppEvent += OnNotified; // Expose the native WinRT object on the page's global object Web.AddWebAllowedObject("AppNotify", appNotify); }