Skip to content

Commit

Permalink
Update to WebView2 NuGet 1.0.1938.49
Browse files Browse the repository at this point in the history
  • Loading branch information
salvadordf committed Aug 29, 2023
1 parent a8d0a1d commit df00412
Show file tree
Hide file tree
Showing 13 changed files with 248 additions and 128 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ WebView4Delphi is an open source project created by Salvador Díaz Fau to embed

WebView4Delphi only supports Windows. If you need to embed a web browser in Linux, Windows or MacOS consider using [CEF4Delphi](https://github.com/salvadordf/CEF4Delphi) instead.

WebView4Delphi uses the [Microsoft Edge WebView2 Runtime](https://docs.microsoft.com/en-us/microsoft-edge/webview2/) and [Microsoft.Web.WebView2 NuGet package version 1.0.1901.177](https://www.nuget.org/packages/Microsoft.Web.WebView2) to embed a web browser.
WebView4Delphi uses the [Microsoft Edge WebView2 Runtime](https://docs.microsoft.com/en-us/microsoft-edge/webview2/) and [Microsoft.Web.WebView2 NuGet package version 1.0.1938.49](https://www.nuget.org/packages/Microsoft.Web.WebView2) to embed a web browser.

WebView4Delphi was developed and tested on Delphi 11.3, Delphi XE2, Delphi 7 and Lazarus 2.2.6/FPC 3.2.2.

Expand Down
Binary file modified bin32/WebView2Loader.dll
Binary file not shown.
Binary file modified bin64/WebView2Loader.dll
Binary file not shown.
Binary file modified docs/WebView4Delphi.chm
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/webview4delphi.lpk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</CompilerOptions>
<Description Value="WebView4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC."/>
<License Value="MIT"/>
<Version Major="1" Release="1901" Build="177"/>
<Version Major="1" Release="1938" Build="49"/>
<Files Count="55">
<Item1>
<Filename Value="..\source\uWVBrowser.pas"/>
Expand Down
54 changes: 51 additions & 3 deletions source/uWVBrowserBase.pas
Original file line number Diff line number Diff line change
Expand Up @@ -840,9 +840,25 @@ TWVBrowserBase = class(TComponent, IWVBrowserEvents)
/// </remarks>
function OpenTaskManagerWindow : boolean;
/// <summary>
/// Post the specified webMessage to the top level document in this WebView.
/// <para>Post the specified webMessage to the top level document in this WebView.
/// The main page receives the message by subscribing to the `message` event of the
/// `window.chrome.webview` of the page document.
/// `window.chrome.webview` of the page document.</para>
/// <code>
/// ```cpp
/// window.chrome.webview.addEventListener('message', handler)
/// window.chrome.webview.removeEventListener('message', handler)
/// ```
/// </code>
/// <para>The event args is an instance of `MessageEvent`. The
/// `ICoreWebView2Settings.IsWebMessageEnabled` setting must be `TRUE` or
/// the web message will not be sent. The `data` property of the event
/// arg is the `webMessage` string parameter parsed as a JSON string into a
/// JavaScript object. The `source` property of the event arg is a reference
/// to the `window.chrome.webview` object. For information about sending
/// messages from the HTML document in the WebView to the host, navigate to
/// [add_WebMessageReceived](/microsoft-edge/webview2/reference/win32/icorewebview2#add_webmessagereceived).
/// The message is delivered asynchronously. If a navigation occurs before
/// the message is posted to the page, the message is discarded.</para>
/// </summary>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2#postwebmessageasjson">See the ICoreWebView2 article.</see></para>
Expand Down Expand Up @@ -878,6 +894,23 @@ TWVBrowserBase = class(TComponent, IWVBrowserEvents)
/// normalized, any URI fragment has been removed, and non-ASCII hostnames
/// have been converted to punycode.</para>
/// <para>Specifying an empty string for aURI matches no URIs.</para>
/// <para>For more information about resource context filters, navigate to
/// [COREWEBVIEW2_WEB_RESOURCE_CONTEXT](/microsoft-edge/webview2/reference/win32/webview2-idl#corewebview2_web_resource_context).</para>
/// <code>
/// | URI Filter String | Request URI | Match | Notes |
/// | ---- | ---- | ---- | ---- |
/// | `*` | `https://contoso.com/a/b/c` | Yes | A single * will match all URIs |
/// | `*://contoso.com/*` | `https://contoso.com/a/b/c` | Yes | Matches everything in contoso.com across all schemes |
/// | `*://contoso.com/*` | `https://example.com/?https://contoso.com/` | Yes | But also matches a URI with just the same text anywhere in the URI |
/// | `example` | `https://contoso.com/example` | No | The filter does not perform partial matches |
/// | `*example` | `https://contoso.com/example` | Yes | The filter matches across URI parts |
/// | `*example` | `https://contoso.com/path/?example` | Yes | The filter matches across URI parts |
/// | `*example` | `https://contoso.com/path/?query#example` | No | The filter is matched against the URI with no fragment |
/// | `*example` | `https://example` | No | The URI is normalized before filter matching so the actual URI used for comparison is `https://example/` |
/// | `*example/` | `https://example` | Yes | Just like above, but this time the filter ends with a / just like the normalized URI |
/// | `https://xn--qei.example/` | `https://&#x2764;.example/` | Yes | Non-ASCII hostnames are normalized to punycode before wildcard comparison |
/// | `https://&#x2764;.example/` | `https://xn--qei.example/` | No | Non-ASCII hostnames are normalized to punycode before wildcard comparison |
/// </code>
/// </summary>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2#addwebresourcerequestedfilter">See the ICoreWebView2 article.</see></para>
Expand Down Expand Up @@ -2421,7 +2454,22 @@ TWVBrowserBase = class(TComponent, IWVBrowserEvents)
/// </remarks>
property OnPermissionRequested : TOnPermissionRequestedEvent read FOnPermissionRequested write FOnPermissionRequested;
/// <summary>
/// `OnProcessFailed` runs when a WebView process ends unexpectedly or becomes unresponsive.
/// <para>`OnProcessFailed` runs when any of the processes in the
/// [WebView2 Process Group](https://learn.microsoft.com/microsoft-edge/webview2/concepts/process-model?tabs=csharp#processes-in-the-webview2-runtime)
/// encounters one of the following conditions:</para>
/// <code>
/// Condition | Details
/// ---|---
/// Unexpected exit | The process indicated by the event args has exited unexpectedly (usually due to a crash). The failure might or might not be recoverable and some failures are auto-recoverable.
/// Unresponsiveness | The process indicated by the event args has become unresponsive to user input. This is only reported for renderer processes, and will run every few seconds until the process becomes responsive again.
/// </code>
/// <para>NOTE: When the failing process is the browser process, a
/// `ICoreWebView2Environment5.BrowserProcessExited` event will run too.</para>
/// <para>Your application can use `ICoreWebView2ProcessFailedEventArgs` and
/// `ICoreWebView2ProcessFailedEventArgs2` to identify which condition and
/// process the event is for, and to collect diagnostics and handle recovery
/// if necessary. For more details about which cases need to be handled by
/// your application, see `COREWEBVIEW2_PROCESS_FAILED_KIND`.</para>
/// </summary>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2#add_processfailed">See the ICoreWebView2 article.</see></para>
Expand Down
Loading

0 comments on commit df00412

Please sign in to comment.