Disposing of the DevToolsContext is causing problems currently as sending the DevTools protocol messages
to the browser is happening after the CefBrowserHost instance has been Disposed.
A separate method of disposing of the DevToolsContext will need to be added that does a cleanup
without sending the commands.
Issue https://github.com/cefsharp/CefSharp.Dom/issues/41
- Add basic xUnit test
- Don't set Creation/LastAccess on cookie creation, these are set internally in Chromium
and are left uninitialized until the cookie is read back from the browser
I haven't tested though I suspect Cookie.Expiry was incorrectly set when Local/Unspecified DateTime was used
cookies are always in GMT
Issue #4234
Logs some basic information so we can see what type of ChromiumWebBrowser hasn't been closed
within as part of the xUnit tests.
* Meant for internal use and might be subject to change.
* WPF/OffScreen - Add WaitForRenderIdleAsync
- Task resolves when render has been idle for the specified time
- Make TaskTimeoutExtensions public (they're not extension methods as this was expected)
- Simplification of calling the DevTools method
- Moved GetContentSizeAsync from OffScreen into partial class (now accessible from WinForms/WPF/OffScreen).
- Added menu option
Resolves#4081
- Add new WaitForNavigationAsync method
- Change LoadUrlAsync to return CefErrorCode.Failed for HttpStatusCode = -1 (better represents there was an error)
Example:
var navigationTask = browser.WaitForNavigationAsync();
var evaluateTask = browser.EvaluateScriptAsync($"window.location.href = '{expected}';");
await Task.WhenAll(navigationTask, evaluateTask);
var navigationResponse = navigationTask.Result;
Resolves#4073
* Core - added support for property interceptor
* Incorporated the review comments
* Incorporated the review comments 2
* Review comments exclude trygetproperty and trysetproperty for .netcore app
* Added the unit test cases for trygetproperty and trysetproperty
* Fixed .net core app build failure
* Added the separate test case for property interceptor
Co-authored-by: sghanti <santosh_ghanti@intuit.com>
- Previously a new PendingTask(TaskCompletionSource) was created using a new Id which worked when the Ids matched
between the browser and render process. If you skipped executing a callback then the Ids would get out of sync.
Issue #3979
- Add IChromiumWebBrowserBase which is can be used for ChromiumWebBrowser instances and ChromiumHostControl
- Reduce code duplication for extensions methods
- Update WinForms Example
- 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
- Initial intention was to have a reusable method that could be used CefSharp.Wpf.HwndHost,
upon further deliberation I've decided to build the functionality into the ChromiumWebBrowser.Partial.cs
and will need to duplicate the functionality in CefSharp.Wpf.HwndHost. This guarantees that the
Task will be resolved in all cases. The previous implementation there was a theoretical change we'd
miss subscribing to the relevant events
- Remove CancellationToken as it's not possible to cancel
Issue #3842
- GlobalContextInitialized wraps a TaskCompletionSource which is resolved
when the Global CefRequestContext has been created
- Reduce code duplication
If successful we can apply the same changes to WinForms/WPF though they're less likely to have
issues than the OffScreen implementation as the CreateBrowser doesn't happen until much later
Issue #3850#3634
- InitializeAsyncBrowserProcessHandler is used to complete the taskCompletionSource
when OnContextInitialized is called
- Update the OffScreen example to be async with a simply SingleThreadSynchronizationContext
to ensure we continue on our main thread.
Issue #3634
This was added as a workaround for Issue #3715 which is specific to WinForms
and will hopefully be fixed upstream.
I've added the logic to all three implementations as I think the behaviour should be
consistent across all implementations.
When ConcurrentMethodRunnerQueue.Dispose is called from a different thread it appears that
the CancellationTokenSource is cancelled (via Dispose) inbetween creation of the Task
and calling Task.Start(TaskScheduler).
Switch from using Task constructor and Task.Start to the preferred Task.Run method.
Added additional unit tests.
Issue #3639
Core - Add LoadUrlAsync
- Add IWebBrowser.LoadUrlAsync
- Add LoadUrlAsyncResponse
- Update unit tests to use new method
- Add static method to allow for CefSharp.Wpf.HwndHost to share the same code.
* fix IsComplexType NullReferenceException
Sometimes, the registered Javascript object does not have a namespace, at this time this function will throw a ```NullReferenceException```.
* add unit test for IsComplexType
* Simplify and remove useless code
* Update CefSharp/Internals/JavascriptObjectRepository.cs
Co-authored-by: campersau <buchholz.bastian@googlemail.com>
Co-authored-by: Alex Maitland <amaitland@users.noreply.github.com>
Co-authored-by: campersau <buchholz.bastian@googlemail.com>