Skip to content

v85.3.130

Latest
Compare
Choose a tag to compare
@amaitland amaitland released this 30 Oct 02:54

First official release includes a new set of IBinder/IMethodInterceptor implementations that include some of the following

Summary:

  • Attempting to assign null to a non-nullable types and other undefined behaviour will throw a detailed exception.
  • Added support for asynchronous Task.
  • Immutable types are prevented from being marshalled for security reasons.
  • Supports conversion of .Net property/method names to JavaScript (camel-cased) naming convention for all methods/propertys to/from JavaScript.
  • .NET types like Guid/Version are valid return types for .NET methods returning to JavaScript.
  • Includes support for marshalling GUID/Version from in string form to the corresponding .Net objects.

*Support for ValueTuple coming soon.

NOTE
For full support can only be used with Async Javascript Binding

//Use the new CefSharp.Extensions.ModelBinding.StrictBindingOptions binding options implementation when registering your
//async object
browser.JavascriptObjectRepository.Register("boundAsync", new BoundAsyncObject(), true, new CefSharp.Extensions.ModelBinding.StrictBindingOptions());

New classes classes

  • CefSharp.Extensions.ModelBinding.StrictModelBinder
  • CefSharp.Extensions.ModelBinding.StrictBindingOptions
  • CefSharp.Extensions.ModelBinding.StrictMethodInterceptor

Based off the PR cefsharp/CefSharp#3138 by Andrew Sampson