Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions WebViewControl/WebView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor

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
Copy Markdown
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.


internal event Action Disposed;
internal event JavascriptContextReleasedEventHandler JavascriptContextReleased;
Expand Down Expand Up @@ -129,6 +130,8 @@ private void Initialize() {
chromium.JavascriptContextReleased += OnJavascriptContextReleased;
chromium.JavascriptUncaughException += OnJavascriptUncaughException;
chromium.UnhandledException += (o, e) => ForwardUnhandledAsyncException(e.Exception);
chromium.ConsoleMessage += (o, e) => OnConsoleMessage.Invoke(o, e);


chromium.RequestHandler = new InternalRequestHandler(this);
chromium.LifeSpanHandler = new InternalLifeSpanHandler(this);
Expand Down