diff --git a/CefSharp.WinForms/WebView.h b/CefSharp.WinForms/WebView.h index 9de5ee7a5..da4942351 100644 --- a/CefSharp.WinForms/WebView.h +++ b/CefSharp.WinForms/WebView.h @@ -46,7 +46,7 @@ namespace WinForms WebView() { - Initialize("about:blank", gcnew BrowserSettings); + Initialize(String::Empty, gcnew BrowserSettings); } WebView(String^ address, BrowserSettings^ settings) diff --git a/CefSharp.Wpf/WebView.h b/CefSharp.Wpf/WebView.h index 753b64585..269baaa25 100644 --- a/CefSharp.Wpf/WebView.h +++ b/CefSharp.Wpf/WebView.h @@ -78,7 +78,7 @@ namespace Wpf WebView() { - Initialize("about:blank", gcnew BrowserSettings); + Initialize(String::Empty, gcnew BrowserSettings); } WebView(String^ address, BrowserSettings^ settings) diff --git a/CefSharp/ScriptCore.cpp b/CefSharp/ScriptCore.cpp index c0b921f10..4149478f5 100644 --- a/CefSharp/ScriptCore.cpp +++ b/CefSharp/ScriptCore.cpp @@ -81,9 +81,13 @@ namespace CefSharp CefPostTask(TID_UI, NewCefRunnableMethod(this, &ScriptCore::UIT_Evaluate, frame, script)); - if (WaitForSingleObject(_event, timeout)) + switch (WaitForSingleObject(_event, timeout)) { + case WAIT_TIMEOUT: throw gcnew ScriptException("Script timed out"); + case WAIT_ABANDONED: + case WAIT_FAILED: + throw gcnew ScriptException("Script error"); } }