Skip to content

Commit 5e1f9e6

Browse files
Merge pull request #3280 from MicrosoftDocs/user/mikehoffms/overview-apis-oct-2024
Update "Overview of APIs" for October 2024
2 parents 6f2cef4 + 58557d0 commit 5e1f9e6

File tree

2 files changed

+70
-14
lines changed

2 files changed

+70
-14
lines changed

microsoft-edge/webview2/concepts/overview-features-apis.md

Lines changed: 59 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: msedgedevrel
66
ms.topic: conceptual
77
ms.service: microsoft-edge
88
ms.subservice: webview
9-
ms.date: 08/26/2024
9+
ms.date: 10/21/2024
1010
---
1111
# Overview of WebView2 features and APIs
1212

@@ -230,7 +230,7 @@ Allows the host app to add JavaScript code in the web content within the WebView
230230
<!-- ------------------------------ -->
231231
#### Web messaging
232232

233-
Your app can send messages to the web content that's within the WebView2 control, and receive messages from that web content. Messages are sent as strings or JSON objects.
233+
Your app can send messages to the web content that's within the WebView2 control, and receive messages from that web content. Messages are sent as strings or JSON objects.
234234

235235
You can optionally post and receive DOM objects along with your message, via the `additionalObjects` parameter of `PostWebMessageAsJson` (.NET, WinRT) or via `PostWebMessageAsJsonWithAdditionalObjects` (Win32). The WebView2 `CoreWebView2FileSystemHandle` class represents the DOM `FileSystemHandle`, and `CoreWebView2File` represents the DOM `File`. See also [`chrome.webview.postMessageWithAdditionalObjects`](../reference/javascript/webview.yml#webview2script-webview-postmessagewithadditionalobjects-member(1)) in the JavaScript Reference.
236236

@@ -794,7 +794,62 @@ The Save As APIs allow you to programmatically perform the **Save as** operation
794794
* `COREWEBVIEW2_SAVE_AS_UI_RESULT_FILE_ALREADY_EXISTS`
795795
* `COREWEBVIEW2_SAVE_AS_UI_RESULT_KIND_NOT_SUPPORTED`
796796
* `COREWEBVIEW2_SAVE_AS_UI_RESULT_CANCELLED`
797-
797+
798+
---
799+
800+
801+
<!-- ---------- -->
802+
###### Configure the security warning when saving a file
803+
804+
By listening for the `SaveFileSecurityCheckStarting` event, your app can register a handler on this event to get the file path, filename extension, and document origin URI information. You can then apply your own rules to do actions such as the following:
805+
* Allow saving the file without presenting a default security-warning UI about the file-type policy.
806+
* Cancel the saving.
807+
* Create your own UI to manage runtime file-type policies.
808+
809+
##### [.NET/C#](#tab/dotnetcsharp)
810+
811+
* `CoreWebView2` Class:
812+
* [CoreWebView2.SaveFileSecurityCheckStarting Event](/dotnet/api/microsoft.web.webview2.core.corewebview2.savefilesecuritycheckstarting)
813+
814+
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs Class](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs)
815+
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.CancelSave Property](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs.cancelsave)
816+
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.DocumentOriginUri Property](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs.documentoriginuri)
817+
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.FileExtension Property](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs.fileextension)
818+
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.FilePath Property](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs.filepath)
819+
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.SuppressDefaultPolicy Property](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs.suppressdefaultpolicy)
820+
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.GetDeferral Method](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs.getdeferral)
821+
822+
##### [WinRT/C#](#tab/winrtcsharp)
823+
824+
* `CoreWebView2` Class:
825+
* [CoreWebView2.SaveFileSecurityCheckStarting Event](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2#savefilesecuritycheckstarting)
826+
827+
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs Class](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2savefilesecuritycheckstartingeventargs)
828+
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.CancelSave Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2savefilesecuritycheckstartingeventargs#cancelsave)
829+
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.DocumentOriginUri Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2savefilesecuritycheckstartingeventargs#documentoriginuri)
830+
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.FileExtension Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2savefilesecuritycheckstartingeventargs#fileextension)
831+
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.FilePath Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2savefilesecuritycheckstartingeventargs#filepath)
832+
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.SuppressDefaultPolicy Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2savefilesecuritycheckstartingeventargs#suppressdefaultpolicy)
833+
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.GetDeferral Method](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2savefilesecuritycheckstartingeventargs#getdeferral)
834+
835+
##### [Win32/C++](#tab/win32cpp)
836+
837+
* [ICoreWebView2_26](/microsoft-edge/webview2/reference/win32/icorewebview2_26)
838+
* [ICoreWebView2_26::add_SaveFileSecurityCheckStarting](/microsoft-edge/webview2/reference/win32/icorewebview2_26#add_savefilesecuritycheckstarting)
839+
* [ICoreWebView2_26::remove_SaveFileSecurityCheckStarting](/microsoft-edge/webview2/reference/win32/icorewebview2_26#remove_savefilesecuritycheckstarting)
840+
841+
* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs)
842+
* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs::get_CancelSave](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs#get_cancelsave)
843+
* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs::get_DocumentOriginUri](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs#get_documentoriginuri)
844+
* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs::get_FileExtension](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs#get_fileextension)
845+
* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs::get_FilePath](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs#get_filepath)
846+
* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs::get_SuppressDefaultPolicy](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs#get_suppressdefaultpolicy)
847+
* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs::GetDeferral](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs#getdeferral)
848+
* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs::put_CancelSave](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs#put_cancelsave)
849+
* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs::put_SuppressDefaultPolicy](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs#put_suppressdefaultpolicy)
850+
851+
* [ICoreWebView2SaveFileSecurityCheckStartingEventHandler](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventhandler)<!-- Win32-only -->
852+
798853
---
799854

800855

@@ -1081,7 +1136,7 @@ Stylizes scrollbars with Microsoft Fluent design and makes the scrollbars overla
10811136

10821137
To experiment with Fluent overlay scrollbars, in Microsoft Edge, go to `edge://flags` and then enter **Fluent overlay scrollbars**.
10831138

1084-
See also:
1139+
See also:
10851140
* [WebView2 browser flags](./webview-features-flags.md) - `msEdgeFluentOverlayScrollbar` and `msOverlayScrollbarWinStyle` flags.
10861141
<!-- todo: article to link to? -->
10871142

microsoft-edge/webview2/release-notes/index.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ ms.date: 10/21/2024
1313
These Release Notes provide information about new features and bug fixes that are included in the WebView2 Release SDK and the WebView2 Prerelease SDK.
1414

1515
<!-- this webpage covers the most recent ~5 months; periodically move oldest h2 sections from bottom of present file to archive.md. eg covers:
16+
Oct 2024
1617
Sep 2024
1718
Aug 2024
1819
Jul 2024
@@ -26,7 +27,7 @@ Feb 2024
2627
-->
2728

2829

29-
<!--
30+
<!--
3031
template for Release and Prerelease
3132
omit the "Experimental APIs" section from actual Release section
3233
-->
@@ -163,7 +164,7 @@ Added a new `SaveFileSecurityCheckStarting` event. Your app can register a hand
163164
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.FilePath Property](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs.filepath?view=webview2-dotnet-1.0.2849.39&preserve-view=true)
164165
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.SuppressDefaultPolicy Property](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs.suppressdefaultpolicy?view=webview2-dotnet-1.0.2849.39&preserve-view=true)
165166
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.GetDeferral Method](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs.getdeferral?view=webview2-dotnet-1.0.2849.39&preserve-view=true)
166-
167+
167168
##### [WinRT/C#](#tab/winrtcsharp)
168169

169170
* `CoreWebView2` Class:
@@ -195,7 +196,7 @@ Added a new `SaveFileSecurityCheckStarting` event. Your app can register a hand
195196

196197
* [ICoreWebView2SaveFileSecurityCheckStartingEventHandler](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventhandler?view=webview2-1.0.2849.39&preserve-view=true)<!-- Win32-only -->
197198

198-
---
199+
---
199200

200201

201202
<!-- ------------------------------ -->
@@ -242,7 +243,7 @@ Added a new `RestartRequested` event. The `RestartRequested` event is raised wh
242243

243244
##### [.NET/C#](#tab/dotnetcsharp)
244245

245-
* `CoreWebView2Environment` Class:
246+
* `CoreWebView2Environment` Class:
246247
* [CoreWebView2Environment.RestartRequested Event](/dotnet/api/microsoft.web.webview2.core.corewebview2environment.restartrequested?view=webview2-dotnet-1.0.2895-prerelease&preserve-view=true)
247248

248249
* `CoreWebView2RestartRequestedEventArgs` Class:
@@ -263,7 +264,7 @@ Added a new `RestartRequested` event. The `RestartRequested` event is raised wh
263264
* [CoreWebView2RestartRequestedPriority Enum](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2restartrequestedpriority?view=webview2-winrt-1.0.2895-prerelease&preserve-view=true)
264265
* `CoreWebView2RestartRequestedPriority.Normal`
265266
* `CoreWebView2RestartRequestedPriority.High`
266-
267+
267268
##### [Win32/C++](#tab/win32cpp)
268269

269270
* [ICoreWebView2ExperimentalEnvironment15](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironment15?view=webview2-1.0.2895-prerelease&preserve-view=true)
@@ -401,8 +402,8 @@ Added a new `SaveFileSecurityCheckStarting` event. Your app can register a hand
401402
* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs::put_SuppressDefaultPolicy](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs?view=webview2-1.0.2895-prerelease&preserve-view=true#put_suppressdefaultpolicy)
402403

403404
* [ICoreWebView2SaveFileSecurityCheckStartingEventHandler](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventhandler?view=webview2-1.0.2895-prerelease&preserve-view=true)
404-
405-
---
405+
406+
---
406407

407408
<!-- ------------------------------ -->
408409
#### Bug fixes
@@ -730,7 +731,7 @@ Added `SaveAs` APIs that allow you to programmatically perform the **Save as** o
730731
* `COREWEBVIEW2_SAVE_AS_UI_RESULT_FILE_ALREADY_EXISTS`
731732
* `COREWEBVIEW2_SAVE_AS_UI_RESULT_KIND_NOT_SUPPORTED`
732733
* `COREWEBVIEW2_SAVE_AS_UI_RESULT_CANCELLED`
733-
734+
734735
---
735736

736737

@@ -772,7 +773,7 @@ No APIs have been promoted from Experimental to Stable in this Prerelease SDK.
772773
<!-- ---------- -->
773774
###### Runtime and SDK
774775

775-
* Re-enabled the default behavior of `SetUserAgent`: by default, `SetUserAgent` is effective for cross-origin iframes.
776+
* Re-enabled the default behavior of `SetUserAgent`: by default, `SetUserAgent` is effective for cross-origin iframes.
776777

777778

778779
<!-- ---------- -->
@@ -998,7 +999,7 @@ The following APIs have been promoted from Experimental to Stable in this Prerel
998999
* `HtmlOnly`
9991000
* `SingleFile`
10001001
* `Complete`
1001-
1002+
10021003
* [CoreWebView2SaveAsUIResult Enum](/dotnet/api/microsoft.web.webview2.core.corewebview2saveasuiresult?view=webview2-dotnet-1.0.2730-prerelease&preserve-view=true)
10031004
* `Success`
10041005
* `InvalidPath`

0 commit comments

Comments
 (0)