Skip to content

Commit

Permalink
Merge pull request #3280 from MicrosoftDocs/user/mikehoffms/overview-…
Browse files Browse the repository at this point in the history
…apis-oct-2024

Update "Overview of APIs" for October 2024
  • Loading branch information
captainbrosset authored Oct 29, 2024
2 parents 6f2cef4 + 58557d0 commit 5e1f9e6
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 14 deletions.
63 changes: 59 additions & 4 deletions microsoft-edge/webview2/concepts/overview-features-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.author: msedgedevrel
ms.topic: conceptual
ms.service: microsoft-edge
ms.subservice: webview
ms.date: 08/26/2024
ms.date: 10/21/2024
---
# Overview of WebView2 features and APIs

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

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.
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.

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.

Expand Down Expand Up @@ -794,7 +794,62 @@ The Save As APIs allow you to programmatically perform the **Save as** operation
* `COREWEBVIEW2_SAVE_AS_UI_RESULT_FILE_ALREADY_EXISTS`
* `COREWEBVIEW2_SAVE_AS_UI_RESULT_KIND_NOT_SUPPORTED`
* `COREWEBVIEW2_SAVE_AS_UI_RESULT_CANCELLED`


---


<!-- ---------- -->
###### Configure the security warning when saving a file

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:
* Allow saving the file without presenting a default security-warning UI about the file-type policy.
* Cancel the saving.
* Create your own UI to manage runtime file-type policies.

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

* `CoreWebView2` Class:
* [CoreWebView2.SaveFileSecurityCheckStarting Event](/dotnet/api/microsoft.web.webview2.core.corewebview2.savefilesecuritycheckstarting)

* [CoreWebView2SaveFileSecurityCheckStartingEventArgs Class](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs)
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.CancelSave Property](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs.cancelsave)
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.DocumentOriginUri Property](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs.documentoriginuri)
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.FileExtension Property](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs.fileextension)
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.FilePath Property](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs.filepath)
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.SuppressDefaultPolicy Property](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs.suppressdefaultpolicy)
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.GetDeferral Method](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs.getdeferral)

##### [WinRT/C#](#tab/winrtcsharp)

* `CoreWebView2` Class:
* [CoreWebView2.SaveFileSecurityCheckStarting Event](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2#savefilesecuritycheckstarting)

* [CoreWebView2SaveFileSecurityCheckStartingEventArgs Class](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2savefilesecuritycheckstartingeventargs)
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.CancelSave Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2savefilesecuritycheckstartingeventargs#cancelsave)
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.DocumentOriginUri Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2savefilesecuritycheckstartingeventargs#documentoriginuri)
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.FileExtension Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2savefilesecuritycheckstartingeventargs#fileextension)
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.FilePath Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2savefilesecuritycheckstartingeventargs#filepath)
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.SuppressDefaultPolicy Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2savefilesecuritycheckstartingeventargs#suppressdefaultpolicy)
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.GetDeferral Method](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2savefilesecuritycheckstartingeventargs#getdeferral)

##### [Win32/C++](#tab/win32cpp)

* [ICoreWebView2_26](/microsoft-edge/webview2/reference/win32/icorewebview2_26)
* [ICoreWebView2_26::add_SaveFileSecurityCheckStarting](/microsoft-edge/webview2/reference/win32/icorewebview2_26#add_savefilesecuritycheckstarting)
* [ICoreWebView2_26::remove_SaveFileSecurityCheckStarting](/microsoft-edge/webview2/reference/win32/icorewebview2_26#remove_savefilesecuritycheckstarting)

* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs)
* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs::get_CancelSave](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs#get_cancelsave)
* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs::get_DocumentOriginUri](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs#get_documentoriginuri)
* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs::get_FileExtension](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs#get_fileextension)
* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs::get_FilePath](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs#get_filepath)
* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs::get_SuppressDefaultPolicy](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs#get_suppressdefaultpolicy)
* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs::GetDeferral](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs#getdeferral)
* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs::put_CancelSave](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs#put_cancelsave)
* [ICoreWebView2SaveFileSecurityCheckStartingEventArgs::put_SuppressDefaultPolicy](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventargs#put_suppressdefaultpolicy)

* [ICoreWebView2SaveFileSecurityCheckStartingEventHandler](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventhandler)<!-- Win32-only -->

---


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

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

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

Expand Down
21 changes: 11 additions & 10 deletions microsoft-edge/webview2/release-notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ms.date: 10/21/2024
These Release Notes provide information about new features and bug fixes that are included in the WebView2 Release SDK and the WebView2 Prerelease SDK.

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


<!--
<!--
template for Release and Prerelease
omit the "Experimental APIs" section from actual Release section
-->
Expand Down Expand Up @@ -163,7 +164,7 @@ Added a new `SaveFileSecurityCheckStarting` event. Your app can register a hand
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.FilePath Property](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs.filepath?view=webview2-dotnet-1.0.2849.39&preserve-view=true)
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.SuppressDefaultPolicy Property](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs.suppressdefaultpolicy?view=webview2-dotnet-1.0.2849.39&preserve-view=true)
* [CoreWebView2SaveFileSecurityCheckStartingEventArgs.GetDeferral Method](/dotnet/api/microsoft.web.webview2.core.corewebview2savefilesecuritycheckstartingeventargs.getdeferral?view=webview2-dotnet-1.0.2849.39&preserve-view=true)

##### [WinRT/C#](#tab/winrtcsharp)

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

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

---
---


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

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

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

* `CoreWebView2RestartRequestedEventArgs` Class:
Expand All @@ -263,7 +264,7 @@ Added a new `RestartRequested` event. The `RestartRequested` event is raised wh
* [CoreWebView2RestartRequestedPriority Enum](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2restartrequestedpriority?view=webview2-winrt-1.0.2895-prerelease&preserve-view=true)
* `CoreWebView2RestartRequestedPriority.Normal`
* `CoreWebView2RestartRequestedPriority.High`

##### [Win32/C++](#tab/win32cpp)

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

* [ICoreWebView2SaveFileSecurityCheckStartingEventHandler](/microsoft-edge/webview2/reference/win32/icorewebview2savefilesecuritycheckstartingeventhandler?view=webview2-1.0.2895-prerelease&preserve-view=true)
---

---

<!-- ------------------------------ -->
#### Bug fixes
Expand Down Expand Up @@ -730,7 +731,7 @@ Added `SaveAs` APIs that allow you to programmatically perform the **Save as** o
* `COREWEBVIEW2_SAVE_AS_UI_RESULT_FILE_ALREADY_EXISTS`
* `COREWEBVIEW2_SAVE_AS_UI_RESULT_KIND_NOT_SUPPORTED`
* `COREWEBVIEW2_SAVE_AS_UI_RESULT_CANCELLED`

---


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

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


<!-- ---------- -->
Expand Down Expand Up @@ -998,7 +999,7 @@ The following APIs have been promoted from Experimental to Stable in this Prerel
* `HtmlOnly`
* `SingleFile`
* `Complete`

* [CoreWebView2SaveAsUIResult Enum](/dotnet/api/microsoft.web.webview2.core.corewebview2saveasuiresult?view=webview2-dotnet-1.0.2730-prerelease&preserve-view=true)
* `Success`
* `InvalidPath`
Expand Down

0 comments on commit 5e1f9e6

Please sign in to comment.