Skip to content

Conversation

@sakya
Copy link

@sakya sakya commented Nov 7, 2024

Fix #185

Registered objects are only valid in the current page.
We should re-register all the objects when the page is loaded

void ICefBrowserHost.HandleLoadEnd(CefBrowser browser, CefFrame frame, int httpStatusCode)
{
// Register all objects
_objectRegistry.SetBrowser(browser);
Copy link

@AndreBooysen AndreBooysen Dec 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my scenario I needed to make sure that the objects are already registered during the page load, so I called this method inside HandleLoadStart instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RegisterJavascriptObject works only on first page loaded

2 participants