Skip to content
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

Add OnConsoleMessage from browser #351

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ykarpeev
Copy link

@ykarpeev ykarpeev commented Sep 3, 2024

This exposes ConsoleMessage to webview. I am using it for debugging purposes here.

@@ -72,6 +72,7 @@ public partial class WebView : IDisposable {
public event Action TitleChanged;
public event UnhandledAsyncExceptionEventHandler UnhandledAsyncException;
public event Action</*url*/string> PopupOpening;
public event ConsoleMessageEventHandler OnConsoleMessage;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing the ConsoleMessageEventHandler

Also OnConsoleMessage should be ConsoleMessageEmitted

Copy link
Author

Choose a reason for hiding this comment

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

Hello, I changed OnConsoleMessage to ConsoleMessageEmitted.

For me Xilium.CefGlue.Common.Events has ConsoleMessageEventHandler and there is an import to it in WebView.cs

using Xilium.CefGlue.Common.Events;

Would it be recommended to recreate it in the webview project? Thank you.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi,

Yes. The webview doesn't/shouldn't expose anything from CefGlue

Copy link
Author

Choose a reason for hiding this comment

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

Thank you. I think I got everything properly recreated in the webview control in latest commit.

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.

2 participants