Share
Embed
Windows 8.1: New WebView control
Ryan Joy
August 17, 2013
Transcript
14 slides
-
Who am I? •Web developer / JavaScript developer / UX
developer •Developer Evangelist @ Microsoft •Live in Austin, TX •<3 JavaScript •Passionate about tech community. All community. •I tweet a lot. @atxryan •When not tweeting, you can find me across the entire internet by searching ‘atxryan’ -
Displaying Web Content in Windows 8 <WebView x:Name="myWebView" Source="http://example.com" />
Familiar to XAML developers <iframe id=“myIframe” src=“http://example.com”></iframe> Familiar to HTML developers -
WebView control for Windows 8.1 • Integrated WebView into display
tree! • Complete set of navigation events and methods • Navigate to local content • Integrated with SmartScreen to block phishing attacks • Single great control available to XAML and HTML developers -
Windows Store apps and the Web Integrate a web component
or service Provide a native experience for a cloud based app The Internet Display a web page -
Key WebView events Navigation events • Navigation starting • Content
loading • DOMContentLoaded • Navigation completed Content events • Unviewable content • Potentially unsafe content Script • Script executing -
Key WebView methods Navigation • Navigate / Stop / Refresh
• CanGoForward & GoForward • CanGoBack & GoBack Content • Capture preview • Capture selection Communication • InvokeScriptAsync & ScriptNotify -
Protecting your app and customer data • SmartScreen in WebView
• Intentional and Trustworthy Communication • Manifest and SSL is critical for app and data integrity Impact for iframes WebView and ScriptNotify -
WebView local navigation support • Navigation to ms-appdata:// http:// -
navigate to internet content ms-appx-web:// - navigate to content in app package ms-appdata:// - navigate to local app state directory • Nativation to ms-local-stream:// myWebView.NavigateToLocalStreamUri( initialUri, resolver ); BuildLocalStreamUri – constructs initial ms-local-stream:// URI IUriToStreamResolver – returns Windows.Storage.Streams.IInputStream