-
-
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
CanExecuteJavascriptInMainFrame incorrectly false after loading page with different origin #3021
Comments
The options at this stage are
|
The checks are only used in the extension methods, you can directly call the relevant
The extension methods execute on the main frame, call ChromiumWebBrowser.GetMainFrame() which will return an |
From memory the frame identifier changes on render process switch, we might be able to use this to discard the second message. |
We have a similar issue, and a workaround that we implemented is to force a reload of the browser if CanExecuteJavascriptInMainFrame is false:
The immediate reloading of the page is not very noticeable, and when the reloading finishes, CanExecuteJavascriptInMainFrame is true and we can execute JS on the page. |
…false after loading page with different origin Proof of concept for a workaround. The frameId for the second OnContextReleased that arrives after the OnContextCreated from the old render process strangely has a frameId greater than the new frameId TODO: Unit tests Issue #3021
|
The v81.3.20-pre packages are now on |
…eAfterNavigatingToDifferentOrigin Confirm CanExecuteJavascriptInMainFrame is true after navigating to a different origin Resolves #3021
This was never fixed |
The test case added in commit 2a62f97 passes successfully. If you are having problems please provide a failing test case (Please create a pull request). |
79.1.310-pre
Both
Win10
WinForms
,WPF
orOffScreen
?WinForms/WPF/OffScreen
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Expected
After loading google.com
SetCanExecuteJavascriptOnMainFrame(true)
After loading github.com
SetCanExecuteJavascriptOnMainFrame(true)
SetCanExecuteJavascriptOnMainFrame(false)
Actual
After loading google.com
SetCanExecuteJavascriptOnMainFrame(true);
After loading github.com
SetCanExecuteJavascriptOnMainFrame(false;
SetCanExecuteJavascriptOnMainFrame(true);
The order of the process messages from the render process is sent in a different order than expected after a render process switch.
The text was updated successfully, but these errors were encountered: