Skip to content

Commit

Permalink
Changed learn.microsoft.com to learn.microsoft.com (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehoffms authored Oct 20, 2022
1 parent 11f0dd1 commit 5c2e72b
Show file tree
Hide file tree
Showing 22 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion GettingStartedGuides/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Getting Started tutorial projects

<!-- only enough info to differentiate this dir level vs the others; what is different about this dir compared to the sibling dirs? -->
These are completed Visual Studio projects that result from following the steps in the [Getting Started tutorials](https://docs.microsoft.com/microsoft-edge/webview2/get-started/get-started).
These are completed Visual Studio projects that result from following the steps in the [Getting Started tutorials](https://learn.microsoft.com/microsoft-edge/webview2/get-started/get-started).
2 changes: 1 addition & 1 deletion GettingStartedGuides/WPF_GettingStarted/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ urlFragment: WPF_GettingStarted
# Get started with WebView2 in WPF apps

<!-- only enough info to differentiate this sample vs the others; what is different about this sample compared to the sibling samples? -->
This sample, **WPF_GettingStarted**, is the completed Visual Studio project that results from following the steps in the tutorial [Get started with WebView2 in WPF apps](https://docs.microsoft.com/microsoft-edge/webview2/get-started/wpf).
This sample, **WPF_GettingStarted**, is the completed Visual Studio project that results from following the steps in the tutorial [Get started with WebView2 in WPF apps](https://learn.microsoft.com/microsoft-edge/webview2/get-started/wpf).

![The running app from the finished WinUI 3 (Windows App SDK) tutorial](screenshots/wpf-getting-started-bing.png)
2 changes: 1 addition & 1 deletion GettingStartedGuides/Win32_GettingStarted/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ urlFragment: Win32_GettingStarted
# Get started with WebView2 in Win32 apps

<!-- only enough info to differentiate this sample vs the others; what is different about this sample compared to the sibling samples? -->
This sample, **Win32_GettingStarted**, is a completed Visual Studio project that includes WebView2 code already added for you. The tutorial [Get started with WebView2 in Win32 apps](https://docs.microsoft.com/microsoft-edge/webview2/get-started/win32) starts by opening this completed project.
This sample, **Win32_GettingStarted**, is a completed Visual Studio project that includes WebView2 code already added for you. The tutorial [Get started with WebView2 in Win32 apps](https://learn.microsoft.com/microsoft-edge/webview2/get-started/win32) starts by opening this completed project.

![The running app for the Win32 Get Started tutorial](screenshots/bing-window.png)
2 changes: 1 addition & 1 deletion GettingStartedGuides/WinForms_GettingStarted/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ urlFragment: WinForms_GettingStarted
# Get started with WebView2 in WinForms apps

<!-- only enough info to differentiate this sample vs the others; what is different about this sample compared to the sibling samples? -->
This sample, **WinForms_GettingStarted**, is the completed Visual Studio project that results from following the steps in the tutorial [Get started with WebView2 in WinForms apps](https://docs.microsoft.com/microsoft-edge/webview2/get-started/winforms).
This sample, **WinForms_GettingStarted**, is the completed Visual Studio project that results from following the steps in the tutorial [Get started with WebView2 in WinForms apps](https://learn.microsoft.com/microsoft-edge/webview2/get-started/winforms).

![The running app from the finished WinForms tutorial](screenshots/winforms-bing.png)
2 changes: 1 addition & 1 deletion GettingStartedGuides/WinUI3_GettingStarted/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ urlFragment: WinUI3_GettingStarted
# Get started with WebView2 in WinUI 3 (Windows App SDK) apps

<!-- only enough info to differentiate this sample vs the others; what is different about this sample compared to the sibling samples? -->
This sample, **WinUI3_GettingStarted**, is the completed Visual Studio project that results from following the steps in the tutorial [Get started with WebView2 in WinUI 3 (Windows App SDK) apps](https://docs.microsoft.com/microsoft-edge/webview2/get-started/winui).
This sample, **WinUI3_GettingStarted**, is the completed Visual Studio project that results from following the steps in the tutorial [Get started with WebView2 in WinUI 3 (Windows App SDK) apps](https://learn.microsoft.com/microsoft-edge/webview2/get-started/winui).

![The running app from the finished WinUI 3 (Windows App SDK) tutorial](screenshots/getting-started-part-3.png)
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# WebView2 Samples

Welcome to the WebView2Samples repo. This repo contains several types of samples for [WebView2](https://docs.microsoft.com/microsoft-edge/webview2/):
Welcome to the WebView2Samples repo. This repo contains several types of samples for [WebView2](https://learn.microsoft.com/microsoft-edge/webview2/):

* Getting Started tutorial projects - Completed Visual Studio projects that result from following the steps in the [Getting Started tutorials](https://docs.microsoft.com/microsoft-edge/webview2/get-started/get-started). These are like Hello World basic apps.
* Getting Started tutorial projects - Completed Visual Studio projects that result from following the steps in the [Getting Started tutorials](https://learn.microsoft.com/microsoft-edge/webview2/get-started/get-started). These are like Hello World basic apps.

* Sample apps - WebView2 sample apps for various frameworks and platforms, as Visual Studio projects. These samples have menus and demonstrate various APIs. For more information, see [Sample apps](https://docs.microsoft.com/microsoft-edge/webview2/code-samples-links).
* Sample apps - WebView2 sample apps for various frameworks and platforms, as Visual Studio projects. These samples have menus and demonstrate various APIs. For more information, see [Sample apps](https://learn.microsoft.com/microsoft-edge/webview2/code-samples-links).

* Deployment samples - Samples that demonstrate deploying the WebView2 Runtime. For more information, see [Deployment samples](https://docs.microsoft.com/microsoft-edge/webview2/samples/deployment-samples).
* Deployment samples - Samples that demonstrate deploying the WebView2 Runtime. For more information, see [Deployment samples](https://learn.microsoft.com/microsoft-edge/webview2/samples/deployment-samples).


## Contributing
Expand Down
4 changes: 2 additions & 2 deletions SampleApps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<!-- only enough info to differentiate this dir level vs the others; what is different about this dir compared to the sibling dirs? -->
This directory contains:

* Sample apps - WebView2 sample apps for various frameworks and platforms, as Visual Studio projects. For more information, see [Sample apps](https://docs.microsoft.com/microsoft-edge/webview2/code-samples-links).
* Sample apps - WebView2 sample apps for various frameworks and platforms, as Visual Studio projects. For more information, see [Sample apps](https://learn.microsoft.com/microsoft-edge/webview2/code-samples-links).

* Deployment samples - Samples that demonstrate deploying the WebView2 Runtime. For more information, see [Deployment samples](https://docs.microsoft.com/microsoft-edge/webview2/samples/deployment-samples).
* Deployment samples - Samples that demonstrate deploying the WebView2 Runtime. For more information, see [Deployment samples](https://learn.microsoft.com/microsoft-edge/webview2/samples/deployment-samples).
2 changes: 1 addition & 1 deletion SampleApps/WV2CDPExtensionWPFSample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ This sample, **WV2CDPExtensionWPFSample**, is built with the WebView2 CDP Extens

This sample is built as a WPF Visual Studio 2019 project. It uses C# in the WebView2 environment.

To use this sample, see [WPF sample app with CDP extension](https://docs.microsoft.com/microsoft-edge/webview2/samples/wv2cdpextensionwpfsample).
To use this sample, see [WPF sample app with CDP extension](https://learn.microsoft.com/microsoft-edge/webview2/samples/wv2cdpextensionwpfsample).

![CDP Extension sample app running](screenshots/wv2cdpextensionwpfsample-app-running.png)
2 changes: 1 addition & 1 deletion SampleApps/WV2DeploymentVSInstallerSample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ urlFragment: WV2DeploymentVSInstallerSample
<!-- only enough info to differentiate this sample vs the others; what is different about this sample compared to the sibling samples? -->
This sample, **WV2DeploymentVSInstallerSample**, demonstrates how to deploy the Evergreen WebView2 Runtime with your application. This sample uses Microsoft Visual Studio Installer Projects to create an installer for the [WebView2APISample](../WebView2APISample//README.md) and chain-install the Evergreen WebView2 Runtime.

For more information, see [WebView2 Deployment Visual Studio installer](https://docs.microsoft.com/microsoft-edge/webview2/samples/wv2deploymentvsinstallersample).
For more information, see [WebView2 Deployment Visual Studio installer](https://learn.microsoft.com/microsoft-edge/webview2/samples/wv2deploymentvsinstallersample).

![The deployment project](./screenshots/new-empty-deployment-project-2019.png)
2 changes: 1 addition & 1 deletion SampleApps/WV2DeploymentWiXBurnBundleSample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ urlFragment: WV2DeploymentWiXBurnBundleSample
<!-- only enough info to differentiate this sample vs the others; what is different about this sample compared to the sibling samples? -->
This sample, **WV2DeploymentWiXBurnBundleSample**, demonstrates how to deploy the Evergreen WebView2 Runtime with your app. This sample creates a WiX installer for [WebView2APISample](../WebView2APISample/README.md) and uses WiX Burn Bundle to chain-install the Evergreen WebView2 Runtime.

For more information about this sample, see [WiX Burn Bundle to deploy the WebView2 Runtime](https://review.docs.microsoft.com/microsoft-edge/webview2/samples/wv2deploymentwixburnbundlesample).
For more information about this sample, see [WiX Burn Bundle to deploy the WebView2 Runtime](https://learn.microsoft.com/microsoft-edge/webview2/samples/wv2deploymentwixburnbundlesample).
2 changes: 1 addition & 1 deletion SampleApps/WV2DeploymentWiXCustomActionSample/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<UIRef Id="WixUI_InstallDir"/>

<!-- Step 4: Config Custom Action to download/install Bootstrapper -->
<!-- Reference: https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#understand-the-webview2-runtime-and-installer-preview -->
<!-- Reference: https://learn.microsoft.com/microsoft-edge/webview2/concepts/distribution#understand-the-webview2-runtime-and-installer-preview -->
<!-- Note: PerMachine case, user can use Impersonate="no" to run MicrosoftEdgeWebview2Setup.exe elevated with /silent flag to install WebView Runtime silently-->

<!-- [Package Standalone Installer] Package Standalone Installer as binary stream to use during app install. SourceFile can be anywhere you put the Standalone Installer on. -->
Expand Down
2 changes: 1 addition & 1 deletion SampleApps/WV2DeploymentWiXCustomActionSample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ urlFragment: WV2DeploymentWiXCustomActionSample
<!-- only enough info to differentiate this sample vs the others; what is different about this sample compared to the sibling samples? -->
This sample, **WV2DeploymentWiXCustomActionSample**, demonstrates how to deploy the Evergreen WebView2 Runtime with your app. This sample creates a WiX installer for [WebView2APISample](../WebView2APISample/README.md) and uses WiX Custom Action to chain-install the Evergreen WebView2 Runtime.

For more information about this sample, see [WiX Custom Action to deploy the WebView2 Runtime](https://docs.microsoft.com/microsoft-edge/webview2/samples/wv2deploymentwixcustomactionsample).
For more information about this sample, see [WiX Custom Action to deploy the WebView2 Runtime](https://learn.microsoft.com/microsoft-edge/webview2/samples/wv2deploymentwixcustomactionsample).
2 changes: 1 addition & 1 deletion SampleApps/WebView2APISample/AppWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1854,7 +1854,7 @@ void AppWindow::CleanupUserDataFolder()
// developers specify userDataFolder during WebView environment
// creation, they would need to pass in that explicit value here.
// For more information about userDataFolder:
// https://docs.microsoft.com/microsoft-edge/webview2/reference/win32/webview2-idl#createcorewebview2environmentwithoptions
// https://learn.microsoft.com/microsoft-edge/webview2/reference/win32/webview2-idl#createcorewebview2environmentwithoptions
WCHAR userDataFolder[MAX_PATH] = L"";
// Obtain the absolute path for relative paths that include "./" or "../"
_wfullpath(userDataFolder, GetLocalPath(L".WebView2", true).c_str(), MAX_PATH);
Expand Down
2 changes: 1 addition & 1 deletion SampleApps/WebView2APISample/AppWindow.cpp.bak
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ void AppWindow::CloseWebView(bool cleanupUserDataFolder)
// developers specify userDataFolder during WebView environment
// creation, they would need to pass in that explicit value here.
// For more information about userDataFolder:
// https://docs.microsoft.com/microsoft-edge/webview2/reference/win32/webview2-idl#createcorewebview2environmentwithoptions
// https://learn.microsoft.com/microsoft-edge/webview2/reference/win32/webview2-idl#createcorewebview2environmentwithoptions
WCHAR userDataFolder[MAX_PATH] = L"";
// Obtain the absolute path for relative paths that include "./" or "../"
_wfullpath(
Expand Down
14 changes: 7 additions & 7 deletions SampleApps/WebView2APISample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ The WebView2APISample is an example of an application that embeds a WebView with

The API Sample showcases a selection of WebView2's event handlers and API methods that allow a native Win32 application to directly interact with a WebView and vice versa.

If this is your first time using WebView, we recommend first following the [Getting Started](https://docs.microsoft.com/microsoft-edge/webview2/gettingstarted/win32) guide, which goes over how to create a WebView2 and walks through some basic WebView2 functionality.
If this is your first time using WebView, we recommend first following the [Getting Started](https://learn.microsoft.com/microsoft-edge/webview2/gettingstarted/win32) guide, which goes over how to create a WebView2 and walks through some basic WebView2 functionality.

To learn more specifics about events and API Handlers in WebView2, you can refer to the [WebView2 Reference Documentation](https://docs.microsoft.com/microsoft-edge/webview2/webview2-api-reference).
To learn more specifics about events and API Handlers in WebView2, you can refer to the [WebView2 Reference Documentation](https://learn.microsoft.com/microsoft-edge/webview2/webview2-api-reference).

## Prerequisites

Expand Down Expand Up @@ -113,7 +113,7 @@ The section below briefly explains some of the key functions in the Sample App.

#### InitializeWebView()

In the AppWindow file, we use the InitializeWebView() function to create the WebView2 environment by using [CreateCoreWebView2EnvironmentWithOptions](https://docs.microsoft.com/microsoft-edge/webview2/reference/win32/webview2-idl#createcorewebview2environmentwithoptions).
In the AppWindow file, we use the InitializeWebView() function to create the WebView2 environment by using [CreateCoreWebView2EnvironmentWithOptions](https://learn.microsoft.com/microsoft-edge/webview2/reference/win32/webview2-idl#createcorewebview2environmentwithoptions).

Once we've created the environment, we create the WebView by using `CreateCoreWebView2Controller`.

Expand Down Expand Up @@ -171,7 +171,7 @@ This callback function is passed to `CreateCoreWebView2Controller` in `Initializ
This function is called within `CreateCoreWebView2Controller`. It sets up some of the event handlers used by the application, and adds them to the WebView.
To read more about event handlers in WebView2, you can refer to this [documentation](https://docs.microsoft.com/microsoft-edge/webview2/reference/win32/icorewebview2).
To read more about event handlers in WebView2, you can refer to this [documentation](https://learn.microsoft.com/microsoft-edge/webview2/reference/win32/icorewebview2).
Below is a code snippet from `RegisterEventHandlers()`, where we set up an event handler for the `NewWindowRequested` event. This event is fired when JavaScript in the webpage calls `window.open()`, and our handler makes a new `AppWindow` and passes the new window's WebView back to the browser so it can return it from the `window.open()` call. Unlike our calls to `CreateCoreWebView2EnvironmentWithOptions` and `CreateCoreWebView2Controller`, instead of providing a method for the callback, we just provide a C++ lambda right then and there.
Expand Down Expand Up @@ -231,7 +231,7 @@ The text under Posting Messages should now be blue.

Here's how it works:

1. In `ScriptComponent.cpp`, we use [PostWebMessageAsJson](https://docs.microsoft.com/microsoft-edge/webview2/reference/win32/icorewebview2#postwebmessageasjson) to post user input to the `ScenarioMessage.html` web application.
1. In `ScriptComponent.cpp`, we use [PostWebMessageAsJson](https://learn.microsoft.com/microsoft-edge/webview2/reference/win32/icorewebview2#postwebmessageasjson) to post user input to the `ScenarioMessage.html` web application.

```cpp
// Prompt the user for some JSON and then post it as a web message.
Expand Down Expand Up @@ -281,7 +281,7 @@ function SetTitleText() {
}
```

2. Within `ScenarioWebMessage.cpp`, we use [add_WebMessageReceived](https://docs.microsoft.com/microsoft-edge/webview2/reference/win32/icorewebview2#add_webmessagereceived) to register the event handler. When we receive the event, after validating the input, we change the title of the App Window.
2. Within `ScenarioWebMessage.cpp`, we use [add_WebMessageReceived](https://learn.microsoft.com/microsoft-edge/webview2/reference/win32/icorewebview2#add_webmessagereceived) to register the event handler. When we receive the event, after validating the input, we change the title of the App Window.

```cpp
// Setup the web message received event handler before navigating to
Expand Down Expand Up @@ -328,7 +328,7 @@ function GetWindowBounds() {
}
```

2. Within `ScenarioWebMessage.cpp`, we use [add_WebMessageReceived](https://docs.microsoft.com/microsoft-edge/webview2/reference/win32/icorewebview2#add_webmessagereceived) to register the received event handler. After validating the input, the event handler gets window bounds from the App Window. [PostWebMessageAsJson](https://docs.microsoft.com/microsoft-edge/webview2/reference/win32/icorewebview2#postwebmessageasjson) sends the bounds to the web application.
2. Within `ScenarioWebMessage.cpp`, we use [add_WebMessageReceived](https://learn.microsoft.com/microsoft-edge/webview2/reference/win32/icorewebview2#add_webmessagereceived) to register the received event handler. After validating the input, the event handler gets window bounds from the App Window. [PostWebMessageAsJson](https://learn.microsoft.com/microsoft-edge/webview2/reference/win32/icorewebview2#postwebmessageasjson) sends the bounds to the web application.

```cpp
if (message.compare(L"GetWindowBounds") == 0)
Expand Down
10 changes: 5 additions & 5 deletions SampleApps/WebView2APISample/assets/AppStartPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ <h2>Issues</h2>
<div class="box3">
<div>
<h2>Documentation</h2>
<form action="https://docs.microsoft.com/search/"><label>Query <input type="text" name="terms" value="WebView2 "/><button>Search</button></label></form>
<a href="https://docs.microsoft.com/microsoft-edge/webview2/">WebView2 documentation</a>
<form action="https://learn.microsoft.com/search/"><label>Query <input type="text" name="terms" value="WebView2 "/><button>Search</button></label></form>
<a href="https://learn.microsoft.com/microsoft-edge/webview2/">WebView2 documentation</a>
</div>
</div>

Expand All @@ -144,9 +144,9 @@ <h2>Runtime</h2>
<div>
<h2>Release Notes</h2>
<ul>
<li><a href="https://docs.microsoft.com/microsoft-edge/webview2/releasenotes">WebView2 SDK</a></li>
<li><a href="https://docs.microsoft.com/deployedge/microsoft-edge-relnote-stable-channel">Edge Stable channel</a></li>
<li><a href="https://docs.microsoft.com/deployedge/microsoft-edge-relnote-beta-channel">Edge Beta channel</a></li>
<li><a href="https://learn.microsoft.com/microsoft-edge/webview2/releasenotes">WebView2 SDK</a></li>
<li><a href="https://learn.microsoft.com/deployedge/microsoft-edge-relnote-stable-channel">Edge Stable channel</a></li>
<li><a href="https://learn.microsoft.com/deployedge/microsoft-edge-relnote-beta-channel">Edge Beta channel</a></li>
</ul>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion SampleApps/WebView2SampleWinComp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ This sample, **WebView2SampleWinComp**, embeds a WebView within a Win32 native a

This sample is built as a Win32 Visual Studio 2019 project. It uses C++ and HTML/CSS/JavaScript in the WebView2 environment.

To use this sample, see [Win32 sample app with Visual Composition](https://docs.microsoft.com/microsoft-edge/webview2/samples/webview2samplewincomp).
To use this sample, see [Win32 sample app with Visual Composition](https://learn.microsoft.com/microsoft-edge/webview2/samples/webview2samplewincomp).

![The WebView2SampleWinComp sample app running](screenshots/wincomp-sample-app-running.png)
Loading

0 comments on commit 5c2e72b

Please sign in to comment.