最近开始了解UWP和Edge内核,在微软技术博客中找到一篇文章,主要是介绍Edge渲染内核使用技术。顺手翻译了一下。不对之处请斧正!
Over the past several months, we have made numerous improvements to theMicrosoft Edge rendering engine (Microsoft EdgeHTML), focusing oninteroperability with modern browsers and compliance with new and emerging standards. In addition to powering Microsoft Edge, EdgeHTML is also available for all Universal Windows Platform (UWP) apps via the WebView control. Today we would like to demonstrate how the WebView control can be used to create your own browser in Windows 10.
在过去的几个月中,我们对微软edge渲染引擎做了很多改进,集中在最新浏览器的交互方式和符合最新的标准。除了强大的MicrosoftEdge外,通用Windows平台 (UWP)同样可通过WebView控件 调用EdgeHTML。现在我们来演示如何调用WebView,在Windows 10中创建属于你自己的浏览器。
Using standard web technology including JavaScript, HTML, and CSS we created a sample UWP application which hosts the WebView and provides basic functionality such as navigation and favorites. These same techniques can be used in any UWP application to seamlessly integrate web content.
使用标准的web技术JavaScript, HTML和 CSS,我们可以创建一个基于WebView并且提供基础功能如“浏览”和“收藏夹”的UWP应用程序。这些技术同样可以使用在任何UWP应用程序中,进行无缝集成网络内容。
The crux of the functionality stems around the powerful WebView control. Offering a comprehensive set of APIs, it overcomes several of the limitationswhich encumber iframes, such as framebusting sites and document loading events. Additionally, the x-ms-webview, how one declares a WebView in HTML, provides new functionality that is not possible with an iframe, such as better access to local content and the ability to take screenshots. When you use the WebView control, you get the same web platform that powers Microsoft Edge.
该应用中的主要功能都来自强大的WebView控件,该控件为开发者提供了全面而众多的API ,帮助他们克服 iframes 带来的限制,比如被框架分裂的网站和文档加载事件。除此之外,x-ms-webview,定义在HTML中的WebView,提供iframe所不支持的新功能,如能更好访问本地内容和屏幕截图能力。当你使用WebView控件,你可以从该网站平台获取对MicrosoftEdge的支持。
Get the Sample Code
You can view the full set of sample code in our repo on GitHub. You can also demo the browser live by installing the app from the Windows Store, or by deploying the Visual Studio solution.
获取代码
你可以在Github中浏览全套的示例代码。你也可以从Windows商店在线下载浏览器安装APP,或者部署该Visual Studio解决方案
Build Your Windows 10 App Today
With the WebView control, we were able to create a simple web browser using standard web technology in just an afternoon. We look forward to seeing what you build with Windows 10!
马上创建你的Windows 10 App
通过使用WebView控件,我们只需要话一个下午的时间,就能使用标准的web技术创建一个简单的网页浏览器。我们期待看到你的Windows 10 作品。
– Josh Rennert, Program Manager, Microsoft Edge
8/28 3:17p – Updating for clarity purposes.
UPDATED AUGUST 28, 2015 3:16 PM