December 11, 2019 10:20 am

Try out WebView2 with the new interactive API sample

By / Program Manager, WebView

Over the past few years, we have seen increased demand for the development of applications that leverage both web and native technologies to modernize native applications, iterate faster with web technologies, and more easily develop cross-platform.

At this year’s Build conference in May, we introduced the Win32 preview of the WebView2 control, powered by the new Chromium-based Microsoft Edge browser. A WebView is a modal that is embedded within a native application, and which renders web content (HTML/CSS/JavaScript) powered by the browser. Since launching our Win32 WebView2 preview, we have been engaging with the community and partners to collect a great deal of feedback, and delivering SDK updates every six weeks.

To learn more about WebViews, how they work, and more about options like Evergreen (WebView content is rendered by the Microsoft Edge browser instance on the user’s computer) vs. Bring Your Own (WebView content is rendered by a separate instance of the Microsoft Edge browser downloaded with the application) check out our developer documentation.

WebView2 API Sample

Recently, we built and launched a sample application (we call it WebView2 API Sample) using the WebView2 APIs to create an interactive application that demonstrates WebView2’s functionalities. The WebView2 API Sample is intended to be the most comprehensive guide available and will be updated regularly as we add more features to our SDK.

Notable features in our WebView2 API Sample are Navigation, Web Messaging (communication between the Win32 Host and the WebView), and Native Object Injection (accessing Win32 Objects directly from JavaScript).

Screen capture showing a WebView2 sample browser

You can build and play around with the WebView2 API Sample by downloading or cloning it from our WebView2 Samples repository. To learn more about the sample’s source code and functionality, read our WebView2 API Sample guide. As you develop your own applications, we recommend referencing the source code for suggested API patterns for WebView2 workflows.

Build your own WebView2 application

You can learn more about WebView2 through our documentation, get started using our getting-started guide, and checkout more examples in our samples repository.

Tell us what you plan to build with WebView2 and please reach out with any thoughts or feedback through our feedback repo.

– Palak Goel, Program Manager, WebView