List icon Contents

Posted on

DotNetBrowser 3.3.5

Chromium 142.0.7444.60 

We upgraded Chromium to a newer version, which introduces important security fixes. Among them:

You can read more about it in the Chromium blog posts:

Conversion from .NET Task to JavaScript Promise 

DotNetBrowser now supports converting a .NET Task into a native JavaScript Promise. This feature was introduced to simplify the process of calling asynchronous .NET methods conveniently from the JavaScript side.

C#
VB
IJsObject document = await browser.MainFrame.ExecuteJavaScript<IJsObject>("document");
Task<string> task = Task.FromResult("Done!");
document.Properties["task"] = task;
IJsPromise promise = await browser
                          .MainFrame
                          .ExecuteJavaScript<IJsPromise>("document[\"task\"].ToJsPromise()")
Dim document As IJsObject = Await browser.MainFrame.ExecuteJavaScript(Of IJsObject)("document")
Dim task As Task(Of String) = System.Threading.Tasks.Task.FromResult("Done!")
document.Properties("task") = task
Dim promise As IJsPromise = Await browser.MainFrame.ExecuteJavaScript(Of IJsPromise)( _
                                "document[""task""].ToJsPromise()")

Permission for Wake Lock API 

Now, you can grant JavaScript code permission to use Wake Lock API:

C#
VB
engine.Profiles.Default.Permissions.RequestPermissionHandler =
    new Handler<RequestPermissionParameters, RequestPermissionResponse>(p =>
    {
        if (p.Type == PermissionType.WakeLockScreen)
        {
            return RequestPermissionResponse.Grant();
        }
        return RequestPermissionResponse.Deny();
    });
engine.Profiles.Default.Permissions.RequestPermissionHandler = 
    New Handler(Of RequestPermissionParameters, RequestPermissionResponse)(Function(p)
        If p.Type = PermissionType.WakeLockScreen Then
            Return RequestPermissionResponse.Grant()
        End If
        Return RequestPermissionResponse.Deny()
    End Function)

Quality enhancements 

  • The DragAndDrop.Move operation now works correctly in Avalonia on macOS.

Download DotNetBrowser 3.3.5

Please share your email with us, and we'll send you download instructions.

We couldn’t deliver a message. Please make sure the email address is correct.
Sending…
EmailBox Please check your inbox.

We were unable to send the email. Please try again.

If you are a registered customer you don’t need to do anything to use this update.

If you would like to evaluate the product, you need an evaluation license.

Get free 30-day trial