OnClose of Window not calling the required method

Having problems with building or using the CefSharp .NET binding? Ask your CEF-related questions here. Please ask general usage questions on StackOverflow.

Moderator: amaitland

OnClose of Window not calling the required method

Postby syed » Wed Oct 13, 2021 8:49 am

Hi

We have upgraded the CEF version from 57.0.0.0 to 84.4.10.0

and with this the registering for ObjectFor scripting was changed from
ChromiumWebBrowser.RegisterJsObject("foo", ObjectForScripting, new BindingOptions { CamelCaseJavascriptNames = false });

to

ChromiumWebBrowser.JavascriptObjectRepository.Register("foo", ObjectForScripting, isAsync: false, options: new BindingOptions { CamelCaseJavascriptNames = false });

Now OnClose of Window
on onbeforeunload we used to call foo.method1()
with previous version foo.metho1() used to get called.

with new version i see that onbeforeunload event is raised and the line of code which invokes the foo.method1() is also executed but the call is not reaching the foo.method1().

How should I get the desired behavior in new version.
syed
Newbie
 
Posts: 7
Joined: Thu Sep 30, 2021 9:59 am

Re: OnClose of Window not calling the required method

Postby amaitland » Wed Oct 13, 2021 2:08 pm

Does the problem reproduce with version 94?
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: OnClose of Window not calling the required method

Postby syed » Mon Oct 18, 2021 4:03 am

What are the version which are supported for CEFSharp ?
syed
Newbie
 
Posts: 7
Joined: Thu Sep 30, 2021 9:59 am

Re: OnClose of Window not calling the required method

Postby amaitland » Mon Oct 18, 2021 3:47 pm

https://github.com/cefsharp/CefSharp/releases

The latest release is supported.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am


Return to CefSharp Forum

Who is online

Users browsing this forum: No registered users and 4 guests