Skip to content

Commit

Permalink
Renaming WebView2Samples default branch from master to main (#1919)
Browse files Browse the repository at this point in the history
* Renaming WebView2Samples default branch from master to main

* Updated more occurrences
  • Loading branch information
peiche-jessica authored Apr 27, 2022
1 parent 0391a13 commit 202ba03
Show file tree
Hide file tree
Showing 24 changed files with 136 additions and 136 deletions.
2 changes: 1 addition & 1 deletion .openpublishing.publish.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
{
"path_to_root": "microsoft-edge/webview2/code/sample/",
"url": "https://github.com/MicrosoftEdge/WebView2Samples",
"branch": "master",
"branch": "main",
"branch_mapping": {}
}
],
Expand Down
82 changes: 41 additions & 41 deletions microsoft-edge/webview2/code-samples-links.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions microsoft-edge/webview2/concepts/clear-browsing-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.author: msedgedevrel
ms.topic: conceptual
ms.prod: microsoft-edge
ms.technology: webview
ms.date: 02/09/2022
ms.date: 04/27/2022
---
# Clear browsing data from the user data folder

Expand Down Expand Up @@ -229,4 +229,4 @@ void ClearAutofillData()
## See also

* [Manage the user data folder](user-data-folder.md)
* [Spec for Clear Browsing Data API](https://github.com/MicrosoftEdge/WebView2Feedback/blob/master/specs/ClearBrowsingData.md)
* [Spec for Clear Browsing Data API](https://github.com/MicrosoftEdge/WebView2Feedback/blob/main/specs/ClearBrowsingData.md)
18 changes: 9 additions & 9 deletions microsoft-edge/webview2/concepts/user-data-folder.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.author: msedgedevrel
ms.topic: conceptual
ms.prod: microsoft-edge
ms.technology: webview
ms.date: 03/17/2022
ms.date: 04/27/2022
---
# Manage user data folders
<!-- # old title: Manage the user data folder -->
Expand Down Expand Up @@ -274,7 +274,7 @@ HRESULT hr = CreateCoreWebView2EnvironmentWithOptions(
.Get());
```

For example code, see the Win32-appropriate, `.cpp` or `.cs` file, near [WebView2Samples repo > WebView2APISample](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/SampleApps/WebView2APISample).
For example code, see the Win32-appropriate, `.cpp` or `.cs` file, near [WebView2Samples repo > WebView2APISample](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2APISample).


<!-- neither specific to custom nor default -->
Expand Down Expand Up @@ -319,7 +319,7 @@ _task = CoreWebView2Environment.CreateAsync(BrowserExecutableFolder,
new CoreWebView2EnvironmentOptions(null, Language, null));
```

For example code, see the .NET (WPF & WinForms)-appropriate, .cpp or .cs file, near [WebView2Samples repo > WebView2WpfBrowser](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/SampleApps/WebView2WpfBrowser).
For example code, see the .NET (WPF & WinForms)-appropriate, .cpp or .cs file, near [WebView2Samples repo > WebView2WpfBrowser](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2WpfBrowser).


**Why you need to specify a custom UDF on this platform:**
Expand Down Expand Up @@ -364,7 +364,7 @@ _task = CoreWebView2Environment.CreateAsync(BrowserExecutableFolder,
new CoreWebView2EnvironmentOptions(null, Language, null));
```

For example code, see the .NET (WPF & WinForms)-appropriate, .cpp or .cs file, near [WebView2Samples repo > WebView2WpfBrowser](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/SampleApps/WebView2WpfBrowser).
For example code, see the .NET (WPF & WinForms)-appropriate, .cpp or .cs file, near [WebView2Samples repo > WebView2WpfBrowser](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2WpfBrowser).


<!-- neither specific to custom nor default -->
Expand All @@ -391,7 +391,7 @@ After creation of the session and UDF, browser data from your WebView2 control i

**Example code:**

For example code, see the WinUI 2 (UWP) `.cs` file, at [WebView2Samples repo > webview2_sample_uwp](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/SampleApps/webview2_sample_uwp).
For example code, see the WinUI 2 (UWP) `.cs` file, at [WebView2Samples repo > webview2_sample_uwp](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/webview2_sample_uwp).



Expand All @@ -408,7 +408,7 @@ On this platform, use the default UDF location.

**Example code:**

For example code, see the WinUI 3 `.cs` file, at [WebView2Samples repo > WebView2_WinUI3_Sample](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/SampleApps/WebView2_WinUI3_Sample).
For example code, see the WinUI 3 `.cs` file, at [WebView2Samples repo > WebView2_WinUI3_Sample](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2_WinUI3_Sample).


**Where browser data gets stored within the UDF:**
Expand Down Expand Up @@ -486,7 +486,7 @@ Use the .NET [CoreWebView2Environment.UserDataFolder Property](/dotnet/api/micro
<!-- // ADO work item "[wv2] Update ClickOnce sample to add code to retrieve UDF location" - then copy lines to here
<!-- ``` -->
For examples of reading the `UserDataFolder` property, see [WebView2Samples repo > webview2_sample_uwp](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/SampleApps/webview2_sample_uwp).
For examples of reading the `UserDataFolder` property, see [WebView2Samples repo > webview2_sample_uwp](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/webview2_sample_uwp).
<!-- ====================================================================== -->
Expand All @@ -507,7 +507,7 @@ private void OnGetUDFClick(object sender, RoutedEventArgs e)
}
```

For examples of reading the `UserDataFolder` property, see the WinUI 2 (UWP) samples in the [WebView2Samples repo > webview2_sample_uwp](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/SampleApps/webview2_sample_uwp).
For examples of reading the `UserDataFolder` property, see the WinUI 2 (UWP) samples in the [WebView2Samples repo > webview2_sample_uwp](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/webview2_sample_uwp).


<!-- ====================================================================== -->
Expand All @@ -528,7 +528,7 @@ private void OnGetUDFClick(object sender, RoutedEventArgs e)
}
```

For example code, see the WinUI 3 `.cs` file, at [WebView2Samples repo > WebView2_WinUI3_Sample](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/SampleApps/WebView2_WinUI3_Sample).
For example code, see the WinUI 3 `.cs` file, at [WebView2Samples repo > WebView2_WinUI3_Sample](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2_WinUI3_Sample).


---
Expand Down
12 changes: 6 additions & 6 deletions microsoft-edge/webview2/get-started/win32.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ ms.author: msedgedevrel
ms.topic: conceptual
ms.prod: microsoft-edge
ms.technology: webview
ms.date: 02/12/2022
ms.date: 04/27/2022
---
# Get started with WebView2 in Win32 apps

In this article, you set up your development tools (if not done already), add WebView2 code to the Win32 app, and learn about WebView2 concepts along the way.

The project uses the [Win32_GettingStarted / WebView2GettingStarted](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/GettingStartedGuides/Win32_GettingStarted) directory that's part of the `WebView2Samples` repo. To use this article, you do the following:
The project uses the [Win32_GettingStarted / WebView2GettingStarted](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/Win32_GettingStarted) directory that's part of the `WebView2Samples` repo. To use this article, you do the following:
1. Download or clone the `WebView2Samples` repo to your local drive.
1. Run the completed project.
1. Optionally delete the WebView2 code from `HelloWebView.cpp`.
1. Follow the remaining steps in this article about adding and understanding the WebView2 code.


* Corresponding, completed, runnable Get Started sample at GitHub: [Getting Started with WebView2 for Win32 apps (Win32_GettingStarted/WebView2GettingStarted.sln)](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/GettingStartedGuides/Win32_GettingStarted#readme).
* Corresponding, completed, runnable Get Started sample at GitHub: [Getting Started with WebView2 for Win32 apps (Win32_GettingStarted/WebView2GettingStarted.sln)](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/Win32_GettingStarted#readme).


<!-- ====================================================================== -->
Expand Down Expand Up @@ -112,7 +112,7 @@ If the **WebView2GettingStarted** project isn't open in Visual Studio, open it i

The above screenshot shows some WebView2 code (`#include "WebView2.h"`), that's already present in the file immediately after cloning (downloading) the repo.

<!-- To confirm that the header lines are already already present in the repo: in a different window or tab, see [WebView2Samples/GettingStartedGuides/Win32_GettingStarted/HelloWebView.cpp](https://github.com/MicrosoftEdge/WebView2Samples/blob/master/GettingStartedGuides/Win32_GettingStarted/HelloWebView.cpp). -->
<!-- To confirm that the header lines are already already present in the repo: in a different window or tab, see [WebView2Samples/GettingStartedGuides/Win32_GettingStarted/HelloWebView.cpp](https://github.com/MicrosoftEdge/WebView2Samples/blob/main/GettingStartedGuides/Win32_GettingStarted/HelloWebView.cpp). -->


### Set the solution to use the Win10 SDK and Visual Studio toolset
Expand Down Expand Up @@ -701,8 +701,8 @@ Local pages:
WebView2Samples repo:
* [WebView2Samples repo](https://github.com/MicrosoftEdge/WebView2Samples)
* [Win32 Sample Code](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/GettingStartedGuides/Win32_GettingStarted) - the code used in this tutorial.
* [WebView2 API Sample](https://github.com/MicrosoftEdge/WebView2Samples/blob/master/SampleApps/WebView2APISample/README.md) - a comprehensive example of WebView2 capabilities.
* [Win32 Sample Code](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/Win32_GettingStarted) - the code used in this tutorial.
* [WebView2 API Sample](https://github.com/MicrosoftEdge/WebView2Samples/blob/main/SampleApps/WebView2APISample/README.md) - a comprehensive example of WebView2 capabilities.
* [WebView2Browser](https://github.com/MicrosoftEdge/WebView2Browser) - a WebView2 sample app.
API Reference:
Expand Down
8 changes: 4 additions & 4 deletions microsoft-edge/webview2/get-started/winforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.author: msedgedevrel
ms.topic: conceptual
ms.prod: microsoft-edge
ms.technology: webview
ms.date: 04/08/2022
ms.date: 04/27/2022
---
# Get started with WebView2 in WinForms apps

Expand All @@ -23,11 +23,11 @@ This article covers how to set up your development tools and create an initial W

Do either of the following:

* Create a new project in Visual Studio, using the steps below. If you want to see the completed project, you can see the [WinForms_GettingStarted](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/GettingStartedGuides/WinForms_GettingStarted) directory in the `WebView2Samples` repo.
* Create a new project in Visual Studio, using the steps below. If you want to see the completed project, you can see the [WinForms_GettingStarted](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/WinForms_GettingStarted) directory in the `WebView2Samples` repo.

* Download or clone the `WebView2Samples` repo, open the completed project in Visual Studio, and follow the steps in this article to understand creating the WinForms project and understand the added WebView2 code.

The corresponding Get Started sample at GitHub: [WinForms_GettingStarted/WinForms_GettingStarted.sln](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/GettingStartedGuides/WinForms_GettingStarted) (no readme file).
The corresponding Get Started sample at GitHub: [WinForms_GettingStarted/WinForms_GettingStarted.sln](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/WinForms_GettingStarted) (no readme file).


<!-- ====================================================================== -->
Expand Down Expand Up @@ -97,7 +97,7 @@ Start with a basic desktop project that contains a single main window.

![In the 'Create a new project' panel, select 'C# > Windows Forms App (.NET Framework)'.](media/winforms-new-project.png)

1. In the **Project name** text box, enter a project name. This tutorial article uses the name **WinForms_GettingStarted**, like the [repo's directory name](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/GettingStartedGuides/WinForms_GettingStarted) for the completed project.
1. In the **Project name** text box, enter a project name. This tutorial article uses the name **WinForms_GettingStarted**, like the [repo's directory name](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/WinForms_GettingStarted) for the completed project.

1. In the **Location** text box, enter a path, such as "C:\Users\username\Documents\MyWebView2Projects\".

Expand Down
6 changes: 3 additions & 3 deletions microsoft-edge/webview2/get-started/winui.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ ms.author: msedgedevrel
ms.topic: conceptual
ms.prod: microsoft-edge
ms.technology: webview
ms.date: 11/05/2021
ms.date: 04/27/2022
---
# Get started with WebView2 in WinUI 3 (Windows App SDK) apps

This article covers how to set up your development tools and create an initial WebView2 app for WinUI 3 (Windows App SDK), and learn about WebView2 concepts along the way.


* Corresponding Get Started sample at GitHub: [Getting Started with WebView2 in WinUI3 (WinUI3_GettingStarted/WinUI_Sample.sln)](https://github.com/MicrosoftEdge/WebView2Samples/blob/master/GettingStartedGuides/WinUI3_GettingStarted/README.md)
* Corresponding Get Started sample at GitHub: [Getting Started with WebView2 in WinUI3 (WinUI3_GettingStarted/WinUI_Sample.sln)](https://github.com/MicrosoftEdge/WebView2Samples/blob/main/GettingStartedGuides/WinUI3_GettingStarted/README.md)


<!-- ====================================================================== -->
Expand Down Expand Up @@ -383,7 +383,7 @@ Local pages:
* [Development best practices for WebView2 appsDevelopment best practices](../concepts/developer-guide.md)

GitHub:
* [Getting Started with WebView2 in WinUI3](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/GettingStartedGuides/WinUI3_GettingStarted#readme)
* [Getting Started with WebView2 in WinUI3](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/WinUI3_GettingStarted#readme)
* [Spec: The WebView2 Xaml control](https://github.com/microsoft/microsoft-ui-xaml-specs/blob/master/active/WebView2/WebView2_spec.md) - the WinUI 3.0 version of the WebView2 control.
* [microsoft-ui-xaml repo > Issues](https://github.com/microsoft/microsoft-ui-xaml/issues) - to enter WinUI-specific feature requests or bugs.

Expand Down
6 changes: 3 additions & 3 deletions microsoft-edge/webview2/get-started/winui2.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.author: msedgedevrel
ms.topic: conceptual
ms.prod: microsoft-edge
ms.technology: webview
ms.date: 11/05/2021
ms.date: 04/27/2022
---
# Get started with WebView2 in WinUI 2 (UWP) apps (public preview)

Expand All @@ -17,7 +17,7 @@ In this tutorial, you:
* Learn about WebView2 concepts along the way.


* Corresponding Get Started sample at GitHub: none; WinUI 3: [Getting Started with WebView2 in WinUI3 (WinUI_Sample/WinUI_Sample.sln)](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/GettingStartedGuides/WinUI3_GettingStarted#readme)
* Corresponding Get Started sample at GitHub: none; WinUI 3: [Getting Started with WebView2 in WinUI3 (WinUI_Sample/WinUI_Sample.sln)](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/WinUI3_GettingStarted#readme)


The **Microsoft.UI.Xaml** (WinUI 2) package is part of the Windows UI Library. This package provides Windows UI features, including:
Expand Down Expand Up @@ -335,7 +335,7 @@ Local pages:

GitHub:
* [WebView2Samples repo](https://github.com/MicrosoftEdge/WebView2Samples)
* [WebView2 UWP Sample App](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/SampleApps/webview2_sample_uwp) - a comprehensive example of WebView2 capabilities.
* [WebView2 UWP Sample App](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/webview2_sample_uwp) - a comprehensive example of WebView2 capabilities.
* [Issues - microsoft-ui-xaml repo](https://github.com/microsoft/microsoft-ui-xaml/issues) - to enter WinUI-specific feature requests or bugs.

WinRT API Reference for WinUI 2 (UWP):
Expand Down
4 changes: 2 additions & 2 deletions microsoft-edge/webview2/get-started/wpf.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ ms.author: msedgedevrel
ms.topic: conceptual
ms.prod: microsoft-edge
ms.technology: webview
ms.date: 11/05/2021
ms.date: 04/27/2022
---
# Get started with WebView2 in WPF apps

This article covers how to set up your development tools and create an initial WebView2 app for Windows Presentation Foundation (WPF), and learn about WebView2 concepts along the way.

* Corresponding Get Started sample at GitHub: [Getting Started with WebView2 in WPF (WPF_GettingStarted/WPFSample.sln)](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/GettingStartedGuides/WPF_GettingStarted#readme)
* Corresponding Get Started sample at GitHub: [Getting Started with WebView2 in WPF (WPF_GettingStarted/WPFSample.sln)](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/WPF_GettingStarted#readme)


<!-- ====================================================================== -->
Expand Down
4 changes: 2 additions & 2 deletions microsoft-edge/webview2/how-to/context-menus.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.author: msedgedevrel
ms.topic: conceptual
ms.prod: microsoft-edge
ms.technology: webview
ms.date: 03/10/2022
ms.date: 04/27/2022
---
# Customize context menus in WebView2

Expand Down Expand Up @@ -883,4 +883,4 @@ The `AreDefaultContextMenusEnabled` property controls whether any context menu c
* [WebView2Samples repo](https://github.com/MicrosoftEdge/WebView2Samples)
<!-- spec: https://github.com/MicrosoftEdge/WebView2Feedback/blob/master/specs/ContextMenuRequested.md -->
<!-- spec: https://github.com/MicrosoftEdge/WebView2Feedback/blob/main/specs/ContextMenuRequested.md -->
6 changes: 3 additions & 3 deletions microsoft-edge/webview2/how-to/hostobject.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.author: msedgedevrel
ms.topic: conceptual
ms.prod: microsoft-edge
ms.technology: webview
ms.date: 2/28/2022
ms.date: 04/27/2022
---
# Call native-side code from web-side code

Expand All @@ -24,11 +24,11 @@ Scenarios that may benefit from using host objects in script:

* JavaScript is sandboxed, limiting its ability on the native side. For example, if you need to access a file on the native side, you must use the native file system. If you have a native object exposed to JavaScript via `AddHostObjectToScript`, you can use it to manipulate files on the native file system.

This article uses the [WebView2 Win32 sample app](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/SampleApps/WebView2APISample) to demonstrate some practical applications of `AddHostObjectToScript`. For more information about how to embed web content into native applications, see [Embed web content into native applications](/microsoft-edge/webview2/how-to/communicate-btwn-web-native).
This article uses the [WebView2 Win32 sample app](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2APISample) to demonstrate some practical applications of `AddHostObjectToScript`. For more information about how to embed web content into native applications, see [Embed web content into native applications](/microsoft-edge/webview2/how-to/communicate-btwn-web-native).

**Preview of the major steps in this article:**

1. Install Visual Studio, install git, clone the [WebView2Samples repo](https://github.com/MicrosoftEdge/WebView2Samples/tree/master/SampleApps/WebView2APISample), and open the solution.
1. Install Visual Studio, install git, clone the [WebView2Samples repo](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2APISample), and open the solution.

1. Define the host object and implement `IDispatch` so that WebView2 can project/add it to the web side.

Expand Down
Loading

0 comments on commit 202ba03

Please sign in to comment.