Core - LoadUrlAsync require url and remove SyncContext param

- Remove url optional null, a Url is now required and an exception will be
  thrown if null or empty. If the browser wasn't loading an null was passed
  in then the task would have never resolved. This provides a predictable behaviour.
  A new WaitForInitialLoadAsync method was added to simplify waiting for initial
  browser load.
- Remove SynchronizationContext param, best to let the framework handle

Issue #3842
This commit is contained in:
Alex Maitland
2021-10-28 10:51:18 +10:00
parent 4a07af26e9
commit 4112340e48
5 changed files with 24 additions and 47 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ namespace CefSharp.OffScreen.Example
}
};
}
await browser.LoadUrlAsync();
await browser.WaitForInitialLoadAsync();
//Check preferences on the CEF UI Thread
await Cef.UIThreadTaskFactory.StartNew(delegate