Skip to content

Diagram relation of WebView2 control, SDK, & Runtime #2450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 71 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
e98ad5d
Initial draft
mikehoffms Feb 17, 2023
b9c34a2
linkfix
mikehoffms Feb 17, 2023
a6fddf4
Add tables
mikehoffms Feb 17, 2023
5c871a6
Topical TOC buckets
mikehoffms Feb 23, 2023
ddf7797
Merge remote-tracking branch 'upstream/main' into user/mikehoffms/wv2…
mikehoffms Mar 1, 2023
bcfa65d
Merge remote-tracking branch 'upstream/main' into user/mikehoffms/wv2…
mikehoffms Mar 3, 2023
176e5b3
Draft diagrams
mikehoffms Mar 9, 2023
21528ff
AddHostObject color
mikehoffms Mar 9, 2023
edcf400
native-side/web-side code
mikehoffms Mar 9, 2023
d76e62c
Reorg sections
mikehoffms Mar 10, 2023
84617df
Move diagram down, detail upper right
mikehoffms Mar 10, 2023
93be2bf
linkfix
mikehoffms Mar 10, 2023
1e4ecca
linkfix2
mikehoffms Mar 10, 2023
47f2572
Applied h2/h4/h6 pattern in wv2 docs
mikehoffms Mar 11, 2023
37ed9d2
Change tabs to h5 in wv2 docs
mikehoffms Mar 11, 2023
f50c324
Merge remote-tracking branch 'upstream/main' into user/mikehoffms/wv2…
mikehoffms Mar 14, 2023
34b333d
Merge remote-tracking branch 'upstream/main' into user/mikehoffms/wv2…
mikehoffms Mar 29, 2023
5f948a2
color diagrams
mikehoffms Mar 31, 2023
46671d5
simplify
mikehoffms Mar 31, 2023
d35342b
labeled diagrams
mikehoffms Mar 31, 2023
7d42bf4
control-runtime-sdk.png
mikehoffms Apr 4, 2023
08eb77a
Merge remote-tracking branch 'upstream/main' into user/mikehoffms/wv2…
mikehoffms Apr 6, 2023
7ae9651
Text of full diagram
mikehoffms Apr 6, 2023
fff9e8b
Merge remote-tracking branch 'upstream/main' into user/mikehoffms/wv2…
mikehoffms Apr 14, 2023
ed6925b
separate article for diagrams
mikehoffms Apr 14, 2023
8c9ff2f
Merge remote-tracking branch 'upstream/main' into user/mikehoffms/wv2…
mikehoffms Apr 17, 2023
053208d
Moved content to arch page
mikehoffms Apr 18, 2023
a0f3751
linkfix
mikehoffms Apr 18, 2023
db0addb
linkfix2
mikehoffms Apr 18, 2023
4e75447
Apply suggestions from code review
Reezaali Apr 19, 2023
575c785
retitle to Components
mikehoffms Apr 19, 2023
0769e25
Talk through diagram
mikehoffms Apr 22, 2023
f986ae8
Merge remote-tracking branch 'upstream/main' into user/mikehoffms/wv2…
mikehoffms Apr 27, 2023
eb64192
blocking extensions
mikehoffms Apr 28, 2023
7016915
Revert "blocking extensions"
mikehoffms Apr 28, 2023
4792113
Merge remote-tracking branch 'upstream/main' into user/mikehoffms/wv2…
mikehoffms May 3, 2023
deab4fb
Merge remote-tracking branch 'upstream/main' into user/mikehoffms/wv2…
mikehoffms May 3, 2023
c7121d5
Merge remote-tracking branch 'upstream/main' into user/mikehoffms/wv2…
mikehoffms May 17, 2023
4c28508
Merge remote-tracking branch 'upstream/main' into user/mikehoffms/wv2…
mikehoffms May 23, 2023
ae16e41
Merge remote-tracking branch 'upstream/main' into user/mikehoffms/wv2…
mikehoffms May 30, 2023
0ad4f52
Merge branch 'MicrosoftDocs:main' into user/mikehoffms/wv2-intro-diagram
mikehoffms Jun 7, 2023
a46b9b0
Merge remote-tracking branch 'upstream/main' into user/mikehoffms/wv2…
mikehoffms Jun 9, 2023
a21f9d0
Merge remote-tracking branch 'upstream/main' into user/mikehoffms/wv2…
mikehoffms Jun 19, 2023
d79f7a7
Merge remote-tracking branch 'upstream/main' into user/mikehoffms/wv2…
mikehoffms Jun 20, 2023
6c7d940
Merge remote-tracking branch 'upstream/main' into user/mikehoffms/wv2…
mikehoffms Jul 1, 2023
3912862
Merge remote-tracking branch 'upstream/main' into user/mikehoffms/wv2…
mikehoffms Jul 19, 2023
6d2ec16
Revert toc
mikehoffms Aug 4, 2023
c6d2ed4
Merge branch 'main' into pr/2450
mikehoffms Aug 11, 2023
6130440
Merge branch 'main' into pr/2450
mikehoffms Aug 19, 2023
1ad986a
Merge branch 'main' into pr/2450
mikehoffms Aug 29, 2023
e0c5418
Merge branch 'main' into pr/2450
mikehoffms Aug 31, 2023
924ec27
Merge branch 'main' into pr/2450
mikehoffms Sep 5, 2023
ea8293e
Merge branch 'main' into pr/2450
mikehoffms Sep 8, 2023
1e945f4
Merge branch 'main' into pr/2450
mikehoffms Sep 20, 2023
8777ed7
Merge branch 'main' into pr/2450
mikehoffms Sep 21, 2023
7e58c2b
Merge branch 'main' into pr/2450
mikehoffms Oct 5, 2023
61d7af2
Merge branch 'main' into pr/2450
mikehoffms Oct 24, 2023
ab15a0d
Merge branch 'main' into pr/2450
mikehoffms Nov 14, 2023
c895971
linkfix
mikehoffms Nov 14, 2023
4e77133
Merge branch 'main' into pr/2450
mikehoffms Nov 15, 2023
d986e6f
Merge branch 'main' into pr/2450
mikehoffms Nov 30, 2023
ad7ac45
Merge branch 'main' into pr/2450
mikehoffms May 1, 2025
1bd040b
yaml
mikehoffms May 1, 2025
a2980b5
normize Download section link
mikehoffms May 6, 2025
fea1b13
Merge branch 'main' into pr/2450
mikehoffms May 6, 2025
e83c4c1
Merge branch 'main' into pr/2450
mikehoffms May 14, 2025
7425f0d
Merge branch 'main' into pr/2450
mikehoffms May 21, 2025
dae5d12
Merge branch 'main' into pr/2450
mikehoffms May 27, 2025
4cdbba7
Merge branch 'main' into pr/2450
mikehoffms May 28, 2025
6ae4ff8
Merge branch 'main' into pr/2450
mikehoffms Jun 19, 2025
56a29e0
Merge branch 'main' into pr/2450
mikehoffms Jun 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions microsoft-edge/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,9 @@
- name: Overview of WebView2 APIs
href: ./webview2/concepts/overview-features-apis.md

- name: Overview of the components of the WebView2 platform
href: webview2/concepts/platform-components.md

- name: "Main classes for WebView2: Environment, Controller, and Core"
href: ./webview2/concepts/environment-controller-core.md

Expand Down
9 changes: 9 additions & 0 deletions microsoft-edge/webview2/concepts/browser-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ The following Microsoft Edge and Google Chrome settings webpages aren't availabl
Google has disabled Google Authentication in embedded webviews, which includes WebView2, due to a security policy they have set. See [Upcoming security changes to Google's OAuth 2.0 authorization endpoint in embedded webviews](https://developers.googleblog.com/2021/06/upcoming-security-changes-to-googles-oauth-2.0-authorization-endpoint.html).

To stay up-to-date on the latest discussion, in the WebView2Feedback repo, see [Google Auth Flows and WebView2](https://github.com/MicrosoftEdge/WebView2Feedback/issues/1647).


<!-- ====================================================================== -->
## Additional keyboard shortcuts information

Expand Down Expand Up @@ -214,3 +216,10 @@ If you set `AreBrowserAcceleratorKeysEnabled` to `FALSE`, the following addition
#### Customizing an individual key

To customize any of the keys individually, use the [AcceleratorKeyPressed](/dotnet/api/microsoft.web.webview2.core.corewebview2controller.acceleratorkeypressed) event.


<!-- ====================================================================== -->
## See also

* [List of Chromium Command Line Switches](https://peter.sh/experiments/chromium-command-line-switches)
* [AcceleratorKeyPressed](/dotnet/api/microsoft.web.webview2.core.corewebview2controller.acceleratorkeypressed?view=webview2-dotnet-1.0.774.44&preserve-view=true) event
13 changes: 13 additions & 0 deletions microsoft-edge/webview2/concepts/distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,13 @@ To use the new version of the WebView2 Runtime, you need to either release all r

In the Evergreen distribution mode, the WebView2 Runtime is automatically kept up to date on the client to provide the latest features and security fixes. If you use Evergreen distribution, to ensure that your WebView2 app stays compatible with the web, you should set up testing infrastructure.

Microsoft Edge preview channels (Beta, Dev, and Canary) provide a sneak peek into what is coming next in the WebView2 Runtime. Test your WebView2 app regularly against a Microsoft Edge preview channel, and update your app or [report issues](https://github.com/MicrosoftEdge/WebViewFeedback) if issues arise. See [Test upcoming APIs and features](../how-to/set-preview-channel.md).
Canary is the recommended preview channel, because it ships at the fastest cadence and has the newest APIs.

To help you decide which channel is right, see [Overview of the Microsoft Edge channels](/deployedge/microsoft-edge-channels). You can [Download Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider) on your test environment, and use `regkey` or environment variables to indicate the channel preference for your testing app.

See [CreateCoreWebView2EnvironmentWithOptions](/microsoft-edge/webview2/reference/win32/webview2-idl#createcorewebview2environmentwithoptions). You can also use WebDriver to automate WebView2 testing, as described in [Automate, and test WebView2 with Microsoft Edge WebDriver](../how-to/webdriver.md).

For best practices about how to test your app for forward-compatibility, see [Prerelease testing using preview channels](../how-to/prerelease-testing.md) and [Self-host by deploying preview channels](../how-to/self-hosting.md).


Expand Down Expand Up @@ -418,3 +425,9 @@ Example managed app folder structure:
\win-x64\native\WebView2Loader.dll (x64)
\win-x86\native\WebView2Loader.dll (x86)
```


<!-- ====================================================================== -->
## See also

* [Download the WebView2 Runtime](https://developer.microsoft.com/microsoft-edge/webview2#download-section) - a section of the **Microsoft Edge WebView2** page, which links to the present article.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
322 changes: 322 additions & 0 deletions microsoft-edge/webview2/concepts/platform-components.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion microsoft-edge/webview2/how-to/context-menus.md
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ When the user selects a WebView2 context menu command (a default menu item that'
---


<!-- ---------------------------------- -->
<!-- ------------------------------ -->
#### Custom menu items

If your host app reports a custom menu item as the selected menu item, then the `CustomMenuItemSelected` event will be fired for the custom menu item.
Expand Down
6 changes: 3 additions & 3 deletions microsoft-edge/webview2/how-to/debug-visual-studio-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Open `launch.json` and complete the following actions to use targeted WebView2 d
When debugging your app, you might need to step through the code from the beginning of the rendering process. If you are rendering webpages on sites and you don't have access to the source code, you can use the `?=value` option, because webpages ignore unrecognized parameters.


<!-- ---------------------------------- -->
<!-- ------------------------------ -->
#### Cannot debug two WebView2 controls at the same time

After the first match is found in the URL, the debugger stops. You cannot debug two WebView2 controls at the same time, because the CDP port is shared by all WebView2 controls, and uses a single port number.
Expand Down Expand Up @@ -257,15 +257,15 @@ WebView2 doesn't load source maps that are referenced by content which was loade
You might encounter these scenarios when using the debugger.


<!-- ---------------------------------- -->
<!-- ------------------------------ -->
#### Doesn't stop at breakpoint

If the debugger doesn't stop at the breakpoint, and you have debug output:

To solve the issue, confirm that the file with the breakpoint is the same file that's used by the WebView2 control. The debugger doesn't perform source path mapping.


<!-- ---------------------------------- -->
<!-- ------------------------------ -->
#### Can't attach to running process

If you can't attach to a running process, and you get a timeout error:
Expand Down
19 changes: 11 additions & 8 deletions microsoft-edge/webview2/how-to/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This article assumes that you already have a working project. If you don't have
<!-- ====================================================================== -->
## Basic WebView2 functions

Use the following functions to begin embedding JavaScript in your WebView2 app.
Use the following functions to embed JavaScript in the native-side code of your WebView2 app:

| API | Description |
| --- | --- |
Expand All @@ -34,27 +34,27 @@ Use the following functions to begin embedding JavaScript in your WebView2 app.
<!-- ====================================================================== -->
## Scenario: ExecuteScript JSON-encoded results

Because the result of `ExecuteScriptAsync` is JSON-encoded, if the result of evaluating the JavaScript is a string, you will receive a JSON-encoded string and not the value of the string.
Because the result of `ExecuteScriptAsync` is JSON-encoded, if the result of evaluating the JavaScript is a string, your native-side code will receive a JSON-encoded string, not the value of the string.

For example, the following code executes script that results in a string. The resulting string includes a quote at the start, a quote at the end, and escaping slashes:
For example, the following native-side code executes script that results in a string. The resulting string includes a quote at the start, a quote at the end, and escaping slashes:

```csharp
string result = await coreWebView2.ExecuteScriptAsync(@"'example'");
Debug.Assert(result == "\"example\"");
```

The script returns a string that `ExecuteScript` JSON-encodes for you. If you call `JSON.stringify` from your script, then the result is doubly encoded as a JSON string the value of which is a JSON string.
The script returns a string that `ExecuteScript` JSON-encodes for you. If you call `JSON.stringify` from your script (in your web-side code), then the result is doubly encoded, as a JSON string the value of which is a JSON string.

Only the properties that are directly in the result are included in the JSON-encoded object; inherited properties aren't included in the JSON-encoded object. Most DOM objects inherit all properties, so you'll need to explicitly copy their values into another object to return. For example:
Only the properties that are directly in the result are included in the JSON-encoded object; inherited properties aren't included in the JSON-encoded object. Most DOM objects inherit all properties, so your web-side code must explicitly copy the properties' values into another object and return that object to your native-side code. For example:

Script | Result
--- | ---
`performance.memory` | `{}`
`(() => { const {totalJSHeapSize, usedJSHeapSize} = performance.memory; return {totalJSHeapSize, usedJSHeapSize}; })();` | `{"totalJSHeapSize":4434368,"usedJSHeapSize":2832912}`

When we return just `performance.memory` we don't see any of its properties in the result because all properties are inherited. If instead, we copy particular property values from `performance.memory` into our own new object to return, then we see those properties in the result.
When we return just `performance.memory`, we don't see any of its properties in the result, because all properties are inherited. If instead, the web-side code copies particular property values from `performance.memory` into a new object and returns that object, then the native-side code sees those properties in the result.

When executing script via `ExecuteScriptAsync` that script is run in the global context. It helps to have your script in an anonymous function so that any variables you define aren't polluting the global context.
When executing script via `ExecuteScriptAsync`, that script is run in the global context. It helps to have your script in an anonymous function, so that any variables you define aren't polluting the global context.

For example:

Expand All @@ -67,11 +67,14 @@ For example:
## Scenario: Running a dedicated script file

In this section, you access a dedicated JavaScript file from your WebView2 control.
<!-- todo: clarify the scenario. from native code? "from" is ambiguous. is the file a web-side file?
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clarify the scenario. from native code? "from" is ambiguous. is the file a web-side file?

what does "dedicated" mean? -->
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does "dedicated" mean?



> [!NOTE]
> Although writing JavaScript inline may be efficient for quick JavaScript commands, you lose JavaScript color themes and line formatting that makes it difficult to write large sections of code in Visual Studio.

To solve the problem, create a separate JavaScript file with your code, and then pass a reference to that file using the `ExecuteScriptAsync` parameters.
To solve the problem, create a separate JavaScript file that contains your code, and then pass a reference to that file by using the `ExecuteScriptAsync` parameters.

1. Create a `.js` file in your project, and add the JavaScript code that you want to run. For example, create a file called `script.js`.

Expand Down
2 changes: 1 addition & 1 deletion microsoft-edge/webview2/how-to/publish-uwp-app-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Once you're satisfied that your packaged app works, run the Windows App Certific
1. After a few minutes, the Windows App Certification Kit (WACK) shows a results page. If the app failed, click the link to review the results.


<!-- ---------------------------------- -->
<!-- ------------------------------ -->
#### Resolving tests

The results page of the Windows App Certification Kit (WACK) app shows any tests that need to be resolved.
Expand Down
3 changes: 1 addition & 2 deletions microsoft-edge/webview2/how-to/webresourcerequested.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ Another example is if the host app is only interested in all requests that are u

---


For details about how the URL filter works, see [CoreWebView2.AddWebResourceRequestedFilter Method > Remarks](/dotnet/api/microsoft.web.webview2.core.corewebview2.addwebresourcerequestedfilter#remarks)


Expand Down Expand Up @@ -143,6 +142,7 @@ Intercepting requests sent from WebView2 enables you to further configure your r

<!-- ------------------------------ -->
#### Example: Intercepting a request, to monitor or modify it
<!-- ## Example: Header modification when making a request -->

<!-- this example doesn't exist in the sample repo -->

Expand Down Expand Up @@ -484,7 +484,6 @@ m_webView->add_WebResourceResponseReceived(

##### [.NET](#tab/dotnet)


**Request:**

* [CoreWebView2.AddWebResourceRequestedFilter Method](/dotnet/api/microsoft.web.webview2.core.corewebview2.addwebresourcerequestedfilter)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 30 additions & 1 deletion microsoft-edge/webview2/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The following diagram shows the spectrum of apps, from maximum reach, to maximum

* Wide **reach** includes websites and Progressive Web Apps.

* In the middle are hybrid apps, such as WebViews and Electron.
* In the middle are hybrid apps, such as WebViews and [Electron](https://en.wikipedia.org/wiki/Electron_(software_framework)).

* Maximum **power** is native apps.

Expand Down Expand Up @@ -62,9 +62,33 @@ Hybrid apps, in the middle of this spectrum, allow you to enjoy the best of both
* **Incremental adoption**. Add web components piece-by-piece to your app.


<!-- ====================================================================== -->
## Overview of the components of the WebView2 platform

To add WebView2 to your app, you use the WebView2 SDK on your development machine, and distribute the WebView2 Runtime to user machines. The following diagram shows the high-level WebView2 components on your development machine and user machines.

![Full diagram of WebView2](./index-images/full-diagram.png)
<!-- .png is owned by index.md, also linked to by platform-components.md -->

Developing a WebView2 app involves software residing in the following places:

| Location | Description |
|---|---|
| Dev machine | You use a Visual Studio project that includes the WebView2 SDK. The SDK includes the WebView2 Runtime, which is an embedded web browser component used for the WebView2 control instances in your host app. |
| Distributing the app and Runtime | There are several ways to deliver the always up-to-date Evergreen version of the WebView2 Runtime to user machines, with several levels of Internet connectivity supported. Some scenarios benefit from distributing a specific, fixed-version WebView2 Runtime. |
| User machine | Your host app on user machines includes instances of the WebView2 control, which uses the WebView2 Runtime. |
| Resources | The product documentation; the WebView2Samples repo including basic Getting Started WebView2 projects and more full-featured Sample projects; the WebView2Announcements repo; and the WebView2Feedback repo. |

For details, see [Overview of the components of the WebView2 platform](./concepts/platform-components.md).


<!-- ====================================================================== -->
## Supported platforms


<!-- ------------------------------ -->
#### Frameworks and coding languages supported

The following programming environments are supported:

* Win32 C/C++
Expand All @@ -74,6 +98,10 @@ The following programming environments are supported:
* [WinUI 2.0](/windows/apps/winui/winui2/)
* [WinUI 3.0](/windows/apps/winui/winui3/)


<!-- ------------------------------ -->
#### Windows versions supported

WebView2 apps can run on the following versions of Windows:

* Windows 11
Expand Down Expand Up @@ -125,6 +153,7 @@ After your environment is set up and the samples build and run on your machine,
<!-- ====================================================================== -->
## See also

* [Overview of the components of the WebView2 platform](./concepts/platform-components.md)
* [Overview of WebView2 APIs](concepts/overview-features-apis.md)
* [Distribute your app and the WebView2 Runtime](concepts/distribution.md)

Expand Down
8 changes: 4 additions & 4 deletions microsoft-edge/webview2/samples/webview2browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ We're setting up a few things here. The [ICoreWebView2Settings](/microsoft-edge/
<!-- ------------------------------ -->
#### Navigate to web page

You can navigate to a web page by entering its URI in the address bar. When pressing Enter, the controls WebView will post a web message to the host app so it can navigate the active tab to the specified location. Code below shows how the host Win32 application will handle that message.
You can navigate to a webpage by entering its URI in the address bar. When pressing Enter, the controls WebView will post a web message to the host app so it can navigate the active tab to the specified location. Code below shows how the host Win32 application will handle that message.

```cpp
case MG_NAVIGATE:
Expand Down Expand Up @@ -525,9 +525,9 @@ function reloadActiveTabContent() {
<!-- ------------------------------ -->
#### Communicating the WebViews

We need to communicate the WebViews that power the tabs and UI, so that user interactions in one tab's WebView have the desired effect in the other WebView. WebView2Browser makes use of set of very useful WebView2 APIs for this purpose, including [PostWebMessageAsJson](/microsoft-edge/webview2/reference/win32/icorewebview2#postwebmessageasjson), [add_WebMessageReceived](/microsoft-edge/webview2/reference/win32/icorewebview2#add_webmessagereceived) and [ICoreWebView2WebMessageReceivedEventHandler](/microsoft-edge/webview2/reference/win32/icorewebview2webmessagereceivedeventhandler).
We need to communicate the WebViews that power the tabs and UI, so that user interactions in one tab's WebView have the desired effect in the other WebView. To do this, WebView2Browser uses WebView2 APIs, including [PostWebMessageAsJson](/microsoft-edge/webview2/reference/win32/icorewebview2#postwebmessageasjson), [add_WebMessageReceived](/microsoft-edge/webview2/reference/win32/icorewebview2#add_webmessagereceived) and [ICoreWebView2WebMessageReceivedEventHandler](/microsoft-edge/webview2/reference/win32/icorewebview2webmessagereceivedeventhandler).

On the JavaScript side, we're making use of the `window.chrome.webview` object exposed to call the `postMessage` method and add an event lister for received messages.
On the JavaScript side, we use the exposed `window.chrome.webview` object to call the `postMessage` method and add an event lister for received messages.

```cpp
HRESULT BrowserWindow::CreateBrowserControlsWebView()
Expand Down Expand Up @@ -592,7 +592,7 @@ function reloadActiveTabContent() {
<!-- ------------------------------ -->
#### Tab handling

A new tab will be created whenever the user clicks on the **new tab** button to the right of the open tabs. The control's WebView will post a message to the host application to create the WebView for that tab and create an object tracking its state.
A new tab is created whenever the user clicks the **New tab** button to the right of the open tabs. The control's WebView will post a message to the host application to create the WebView for that tab and create an object tracking its state.

```javascript
function createNewTab(shouldBeActive) {
Expand Down