-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove CefSharp.WebBrowserExtensions.RegisterJsObject/RegisterAsyncJsObject #2990
Comments
Slight change of plans, I'll revert the removal
|
The methods now throw an exception that links to this issue, there are code examples above for code migration. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
You can review the code that was removed at ffaff5d#diff-7ac45247db5707eecab6fe1290834329L56 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
No functionality changes were made. If you have an example that uses one of the two removed methods then you will need to post code. Off-topic questions won't be answered. Statements saying it doesn't work cannot be answered unless accompanied by code that you are having trouble with. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
For those migrating
Please keep comments on topic (migrating from an older version where you used one of the two methods listed above)
For those of you seeing an error similar to |
Problems migrating to the new function is reported at (Function calls from js to the cef container application where never delivered). |
It would be nice to update also the WcfEnabled documentation - it still refers to the old way (
I think a better formulation would be:
|
I am using 94.4.5 and somethings changed again
but i still linked to this page in the browser.RegisterJsObject method. |
This property only exists in the https://github.com/cefsharp/CefSharp/blob/cefsharp/94/CefSharp/CefSharpSettings.cs#L33
As the exception states you've attempted to change the property after the browser has been created. It's too late. You need to set it earlier. Further questions please use https://github.com/cefsharp/CefSharp/discussions |
how to call object and its method in javascript after registering? |
First you must create a class in Visual Studio with a method that you will call from JavaScript. Thus
The creator of this thread probably forgot to write this because he thought it was too obvious. But in fact, not everyone understands this. |
It seems I have discovered a flaw. The object is added to the MainFrame only. In ChildFrames the object is missing and does not work. |
As per above, please use discussions. |
Firstly this is only a minor change to allow for some upcoming changes, the changes to your code are fairly simple.
The methods have been removed to page the way for Legacy Binding being available on a per object basis rather than a per browser basis. See #2977 for details on that change (hopefully be available in the next major release).
For those upgrading here are updated examples.
RegisterJsObject
RegisterAsyncJsObject
The text was updated successfully, but these errors were encountered: