Skip to content

Commit 061658a

Browse files
committed
promote headings
1 parent fc45782 commit 061658a

4 files changed

Lines changed: 61 additions & 61 deletions

File tree

microsoft-edge/webview2/platforms/hololens-2-unity.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ For WebView2-enabled 2D applications on HoloLens 2, see [Get started with WebVie
2323

2424

2525
<!-- ====================================================================== -->
26-
## Additional considerations for WebView2 on HoloLens 2
27-
28-
29-
<!-- ------------------------------ -->
30-
#### Limitations and known issues
26+
## Limitations and known issues
3127

3228
When developing a HoloLens 2 Unity app with WebView2, be aware of some limitations and known issues:
3329

@@ -42,8 +38,8 @@ When developing a HoloLens 2 Unity app with WebView2, be aware of some limitatio
4238
* **Performance**: Complex websites with heavy use of JavaScript or advanced rendering may impact system performance or the host application's framerate. For general performance-related limitations and recommendations, see [Understanding performance for mixed reality](/windows/mixed-reality/develop/advanced-concepts/understanding-performance-for-mixed-reality) in the mixed reality documentation. Also see [Performance optimization](#performance-optimization), below.
4339

4440

45-
<!-- ------------------------------ -->
46-
#### Performance optimization
41+
<!-- ====================================================================== -->
42+
## Performance optimization
4743

4844
Optimizing the performance of WebView2 in your HoloLens 2 Unity app is crucial for a smooth user experience. Here are some recommendations:
4945

@@ -60,8 +56,8 @@ Optimizing the performance of WebView2 in your HoloLens 2 Unity app is crucial f
6056
* **PIX**: A performance tuning and debugging tool for Windows that can also be used to profile Unity applications on HoloLens 2.
6157

6258

63-
<!-- ------------------------------ -->
64-
#### Navigation
59+
<!-- ====================================================================== -->
60+
## Navigation
6561

6662
Some navigation methods are demonstrated in [Step 7 - Extending WebView2 functionality](../get-started/hololens2.md#step-7---extending-webview2-functionality) in _Get started with WebView2 in HoloLens 2 Unity apps (Preview)_. The present section expands on that demonstration.
6763

@@ -70,8 +66,8 @@ See also:
7066
* [API Reference for Mixed Reality WebView plugin](/windows/mixed-reality/develop/advanced-concepts/webview2-unity-plugin) - for HoloLens 2 in the WebView2 Unity plugin.<!-- toc title: WebView2 Unity Plugin API -->
7167

7268

73-
<!-- ---------- -->
74-
###### IWebView interface
69+
<!-- ------------------------------ -->
70+
#### IWebView interface
7571

7672
<!-- [IWebView::Load method]()-->
7773

@@ -93,8 +89,8 @@ public interface IWebView
9389
```
9490

9591

96-
<!-- ---------- -->
97-
###### IWithBrowserHistory interface
92+
<!-- ------------------------------ -->
93+
#### IWithBrowserHistory interface
9894

9995
The `IWithBrowserHistory` interface exposes a few methods and events related to page navigation. This mainly allows developers to navigate forward and backward, as you would expect with a typical web-browsing experience:
10096

@@ -114,8 +110,8 @@ public interface IWithBrowserHistory : IWebView
114110
```
115111

116112

117-
<!-- ---------- -->
118-
###### SetVirtualHostNameToFolderMapping and SetVirtualHostMapping
113+
<!-- ------------------------------ -->
114+
#### SetVirtualHostNameToFolderMapping and SetVirtualHostMapping
119115

120116
The [CoreWebView2.SetVirtualHostNameToFolderMapping Method](/dotnet/api/microsoft.web.webview2.core.corewebview2.setvirtualhostnametofoldermapping) enables mapping between a virtual host name and a folder path, making it accessible to websites using that host name. This method maps a local domain name to a local folder, so that the WebView2 control loads content from the specified local folder when attempting to access a resource for that domain.
121117

@@ -153,8 +149,8 @@ public class WebViewExample : MonoBehaviour
153149
```
154150

155151

156-
<!-- ------------------------------ -->
157-
#### Input
152+
<!-- ====================================================================== -->
153+
## Input
158154

159155
There are various ways to handle input in Unity for mixed reality applications.
160156

microsoft-edge/webview2/platforms/winui2-uwp.md

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,42 @@ ms.author: msedgedevrel
66
ms.topic: conceptual
77
ms.service: microsoft-edge
88
ms.subservice: webview
9-
ms.date: 01/24/2025
9+
ms.date: 01/27/2025
1010
---
1111
# WebView2 in WinUI 2 (UWP) apps
1212

13-
14-
<!-- ====================================================================== -->
15-
## Special considerations for WebView2 on WinUI 2 (UWP)
16-
17-
The WebView2 WinUI 2 (UWP) control is in development.
13+
The following considerations apply to WebView2 in WinUI 2 (UWP) apps. The WebView2 WinUI 2 (UWP) control is in development.
1814

1915

20-
<!-- ------------------------------ -->
21-
#### Autofill UI
16+
<!-- ====================================================================== -->
17+
## Autofill UI
2218

2319
Autofill UI is not implemented yet for WebView2 for UWP apps.
2420

2521
See also:
2622
* [Autofill](../concepts/overview-features-apis.md#autofill) in _Overview of WebView2 APIs_.
2723

2824

29-
<!-- ------------------------------ -->
30-
#### Print to PDF
25+
<!-- ====================================================================== -->
26+
## Print to PDF
3127

3228
Print to PDF requires that the app have access to a writeable location in UWP, such as a local folder. For a full list of UWP-accessible paths, see [File access permissions](/windows/uwp/files/file-access-permissions).
3329

3430
See also:
3531
* [Printing](../concepts/overview-features-apis.md#printing) in _Overview of WebView2 APIs_.
3632

3733

38-
<!-- ------------------------------ -->
39-
#### Default printing
34+
<!-- ====================================================================== -->
35+
## Default printing
4036

4137
Default printing is disabled for WebView2 for UWP apps. However, you can capture and print the current viewport, by calling `CapturePreview`.
4238

4339
See also:
4440
* [Image capture](../concepts/overview-features-apis.md#image-capture) in _Overview of WebView2 APIs_.
4541

4642

47-
<!-- ------------------------------ -->
48-
#### SmartScreen
43+
<!-- ====================================================================== -->
44+
## SmartScreen
4945

5046
WebView2 sends URLs that are navigated to in your application to the [SmartScreen](/windows/security/threat-protection/microsoft-defender-smartscreen/microsoft-defender-smartscreen-overview) service, to ensure that your customers stay secure. If you want to disable this navigation, you can do so via an environment variable:
5147

@@ -54,37 +50,43 @@ WebView2 sends URLs that are navigated to in your application to the [SmartScree
5450
This environment variable must be set prior to `CoreWebView2` creation, which occurs when the [WebView2.Source property](/windows/winui/api/microsoft.ui.xaml.controls.webview2.source) is initially set or the [WebView2.EnsureCoreWebView2Async method](/windows/winui/api/microsoft.ui.xaml.controls.webview2.ensurecorewebview2async) is initially called.
5551

5652

57-
<!-- ------------------------------ -->
58-
#### Downloading files
53+
<!-- ====================================================================== -->
54+
## Downloading files
5955

6056
There are a couple of known limitations for current downloads behavior for WebView2 in UWP.
6157

62-
###### Save As
58+
59+
<!-- ------------------------------ -->
60+
#### Save As
6361

6462
Saving files via **Save As** is working and is enabled for WebView2 for UWP apps. The files will be saved in the folder that the user selects.
6563

66-
###### Which folder the files are downloaded to
64+
65+
<!-- ------------------------------ -->
66+
#### Which folder the files are downloaded to
6767

6868
If the host doesn't change the `ResultFilePath` of the downloaded file, the downloaded files will be downloaded to a subfolder with the app package's name in the `Downloads` folder.
6969

7070
If the host changes the `ResultFilePath` of the downloaded file, the file will only be downloaded if the app has access to that file path by default. If you want to use a file location that the app doesn't have access to by default, you must set the corresponding capability. See [App capability declarations](/windows/uwp/packaging/app-capability-declarations) in the UWP documentation.
7171

72-
###### Downloads Hub
72+
73+
<!-- ------------------------------ -->
74+
#### Downloads Hub
7375

7476
Opening files and folders from the Downloads Hub is disabled. Clicking on the file or folder icon won't open the respective file/folder.
7577

7678
See also:
7779
* [Downloads](../concepts/overview-features-apis.md#downloads) in _Overview of WebView2 APIs_.
7880

7981

80-
<!-- ------------------------------ -->
81-
#### XAML limitation
82+
<!-- ====================================================================== -->
83+
## XAML limitation
8284

8385
XAML Island support requires additional work and may be considered for future releases.
8486

8587

86-
<!-- ------------------------------ -->
87-
#### Setting DefaultBackgroundColor
88+
<!-- ====================================================================== -->
89+
## Setting DefaultBackgroundColor
8890

8991
On WinUI 2, the `DefaultBackgroundColor` property is not exposed directly. You can set the default background color by setting an environment variable, as follows:
9092

@@ -104,24 +106,26 @@ todo: relevant?
104106
-->
105107

106108

107-
<!-- ------------------------------ -->
108-
#### Setting transparency
109+
<!-- ====================================================================== -->
110+
## Setting transparency
109111

110112
On WinUI 2, transparency is achieved by setting the color to `00FFFFFF`.
111113

112114

113-
<!-- ------------------------------ -->
114-
#### CSS cursors
115+
<!-- ====================================================================== -->
116+
## CSS cursors
115117

116118
On WinUI 2 (UWP), CSS cursors have the following limitations.
117119

118120

119-
###### Image URLs
121+
<!-- ------------------------------ -->
122+
#### Image URLs
120123

121124
The CSS cursor cannot be an image URL, such as `cursor: url(https://contoso.com/cursor.png), pointer;`. See [CSS - cursor loaded from URL doesn't work](https://github.com/MicrosoftEdge/WebView2Feedback/issues/1925).
122125

123126

124-
###### Predefined CSS cursors
127+
<!-- ------------------------------ -->
128+
#### Predefined CSS cursors
125129

126130
On WinUI 2 (UWP), some of the predefined CSS cursors are not supported. You can use CSS cursors to change the cursor to some of the predefined cursors, such as `cursor: wait;` or `cursor: crosshair;`, but not to others, such as `cursor: progress` or `cursor: none`.
127131

@@ -175,14 +179,14 @@ See also:
175179
<!-- known limitation: destination page doesn't scroll to anchor -->
176180

177181

178-
<!-- ------------------------------ -->
179-
#### Microsoft Edge Developer Tools
182+
<!-- ====================================================================== -->
183+
## Microsoft Edge Developer Tools
180184

181185
On WinUI 2, Microsoft Edge DevTools cannot be launched inside a store-signed WebView2 WinUI 2 (UWP) app. However, you can work around this by using remote debugging. See [Remote debugging WebView2 WinUI 2 (UWP) apps](../how-to/remote-debugging.md).
182186

183187

184-
<!-- ------------------------------ -->
185-
#### API limitations
188+
<!-- ====================================================================== -->
189+
## API limitations
186190

187191
The following classes aren't accessible in WinUI 2:
188192

microsoft-edge/webview2/platforms/winui3-windows-app-sdk.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.date: 01/24/2025
1010
---
1111
# WebView2 in WinUI 3 (Windows App SDK) apps
1212

13+
The following considerations apply to WebView2 in WinUI 3 (Windows App SDK) apps.
14+
1315

1416
<!-- ====================================================================== -->
1517
## WinAppSDK supports custom WebView2 environments
@@ -33,11 +35,7 @@ API Reference:
3335

3436

3537
<!-- ====================================================================== -->
36-
## WinUI 3 WebView2 special considerations
37-
38-
39-
<!-- ------------------------------ -->
40-
#### Disabling SmartScreen navigation
38+
## Disabling SmartScreen navigation
4139

4240
WebView2 sends URLs that are navigated to in your application to the [SmartScreen](/windows/security/threat-protection/microsoft-defender-smartscreen/microsoft-defender-smartscreen-overview) service, to ensure that your customers stay secure. If you want to disable this navigation, use a custom `CoreWebView2Environment`, as follows:
4341

@@ -56,8 +54,8 @@ this.WebView2.EnsureCoreWebView2Async(environment);
5654
```
5755

5856

59-
<!-- ---------- -->
60-
###### Disabling SmartScreen by using an environment variable
57+
<!-- ====================================================================== -->
58+
## Disabling SmartScreen by using an environment variable
6159

6260
We no longer recommend using an environment variable. Use the above API code-based approach instead.
6361

@@ -66,8 +64,8 @@ We no longer recommend using an environment variable. Use the above API code-ba
6664
This environment variable must be set prior to `CoreWebView2` creation, which occurs when the [WebView2.Source property](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.webview2.source#microsoft-ui-xaml-controls-webview2-source) is initially set or the [WebView2.EnsureCoreWebView2Async method](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.webview2.ensurecorewebview2async#microsoft-ui-xaml-controls-webview2-ensurecorewebview2async) is initially called.
6765

6866

69-
<!-- ------------------------------ -->
70-
#### Setting DefaultBackgroundColor
67+
<!-- ====================================================================== -->
68+
## Setting DefaultBackgroundColor
7169

7270
In WebView2 for WinUI 3, the `DefaultBackgroundColor` setting exists on the WebView2 XAML object. For example:
7371

@@ -80,8 +78,8 @@ public MainWindow()
8078
```
8179

8280

83-
<!-- ------------------------------ -->
84-
#### Transparency
81+
<!-- ====================================================================== -->
82+
## Transparency
8583

8684
WinUI 3 doesn't support transparent backgrounds. See [Transparent background support for WebView2? · Issue #2992](https://github.com/microsoft/microsoft-ui-xaml/issues/2992).
8785

microsoft-edge/webview2/platforms/wpf.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.date: 01/27/2025
1010
---
1111
# WebView2 in WPF apps
1212

13+
The following considerations apply to WebView2 in WPF apps.
14+
1315

1416
<!-- ====================================================================== -->
1517
## Show WPF elements on top of the WebView2 layer (WebView2CompositionControl)

0 commit comments

Comments
 (0)