- 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
It's a manual process at this stage and requires the end user to deal to:
- Return "CefSharpDefEvalScriptRes" immediately after the promise function has been created
- Call cefSharp.sendEvalScriptResponse when the async/await (promise) processing has completed
Core - Add IAsyncMethodInterceptor
- Add IAsyncMethodInterceptor
Extension of IMethodInterceptor to allow for easier evaluation of async taskScheduler
- Add Additional unit tests
- Add JavascriptBindingSettings.AlwaysInterceptAsynchronously for cases where you'd like all method calls to use
IAsyncMethodInterceptor.InterceptAsync
Follow up to PR #3291
Co-authored-by: Andrew Sampson <andrew@rainway.com>
Co-authored-by: Emily Hudson <emily33901@gmail.com>
* Example - Update to QUnit 2.10
Follows ae41e10d71, which introduced a few references
to QUnit 2.10.
* Example - Simplify the BindObjectAsync unit tests
The `QUnit.test()` may take an async function and/or to return a Promise.
This uses JavaScript's native async/await capabilities to wait for that,
much the same way manual tracking via `assert.async()` would.
Using this can simplify the test structures by a lot.
`assert.rejects()` asserts that a promise throws an error.
`assert.throws()` asserts that a block directly throws an error.
I've also tried to use `assert.deepEqual()`. I suspect a copy
of this function was placed here directly, but I couldn't find
in the history why, so perhaps worth trying if the built-in
one now works.
* Net Core - Rename CefSharp.Core.dll to CefSharp.Core.Runtime.dll
Partial rename, only Net Core, folder not renamed
* Net Core - Rename CefSharp.Core.RefAssembly to CefSharp.Core.netcore
Remove GenApi
* Core - Rename CefDragDataWrapper to DragData
Move into CefSharp.Core namespace
* WinForms/WPF/OffScreen - Migrate from GitLink command line to Nuget package
* Net Core - Refactor to have CefSharp.Core.dll contain only public Api
* Net Core - Remove CefSharp.Core.RefAssembly
* Net Core - Change CefSharp.Core.netcore output folder
* Net Core - Restructure nuget packages
* Net Core - Add Cefsharp.Core.Runtime.RefAssembly
* Net Core - Hide CLI/C++ classes from intellisense
Make sure users don't attempt to load them directly
* Rename CefSharp.Core to CefSharp.Core.Runtime
* Core - Restructure Net 4.5.2 packages to use CefSharp.Core.dll anycpu variant
Attempt to load CefSharp.Core.Runtime at runtime rather than having to use msbuild to copy the correct version
* Rename CefSharp.Core.netcore to CefSharp.Core
* WPF/WinForms/OffScreen - Change from x86/64 to AnyCPU
As they are all managed assemblies they can target AnyCPU.
Includes CefSharp.dll
* Convert RequestContextBuilder from C++ to C#
Now part of the CefSharp.Core PublicApi
* Update version number to 87.1.11
* Migrate more of the public Api to C#
* Net Core - Basic restructure complete
* Net Core - ModuleInitializer (Doesn't work yet)
* Remove direct references to BrowserSettings
* Net Core - ModuleInitializer load CefShar.Core.Runtime.dl
* Net Core - Load libcef.dll via CLR Module initializer
If no RID is specified then we can load libcef.dll using the module initializer
* Add version to CefSharp.Core
* Remove dependency on CefSharp.Core.Runtime
Rewrite common targets
* AnyCPU app.config transform
Improve AnyCPU support
* Improve Net Core 3 support
Only delete CefSharp.Core.Runtime.dll when AnyCPU
* Nuget - Add CefSharp.Core.Runtime reference when TargetFramework = NetCore
* Fix Typos
Based on #3306
* Net Core - Rename CefSharp.Core.Runtime RefAssembly source file
* Net Full - Generate CefSharp.Core.Runtime Ref Assembly
For now the powershell build script generates the .cs file based on a x86 release build.ps1
It's not possible to directly install GenApi as it requires a Sdk style project
* Net Core - Old packages copy files to required folders
* Test - Install newer .Net Compiler and set Lang Version to 7.3
* Net Core - Exclude Net 452 Runtime generated reference source
* Core - Add Refactoring TODO
* Ref Assembly - Generate source as part of build
- Move ref assembly source generate into GenerateRefAssemblySource.ps1
- Call before project build
Runs locally, see if Appveyor has a problem with the powershell script execution
* Core - Add more factory methods to create instances of managed wrappers
* Net Core - Make Initialzier properties internal
Not quite sure what the public API should look like as yet, so making internal for now.
To prevent subtasks from attempting to use our LimitedConcurrencyLevelTaskScheduler we need to
specify TaskCreationOptions.HideScheduler when creating the Task
Resolves#3293
- Rename settings object to JavascriptBindingSettings
- Validate JavascriptBindingSettings.JsBindingGlobalObjectName in setter to provide immediate
feedback
- Add FreezableBase which throws exception when frozen (we can reuse this for some other settings classes)
- Add some basic Unit Tests (More would be better)
Follow on from #3126
JsonString is parsed into CefValue using the CefParseJson function
If your data is already stored in JSON then it can be parsed directly
or you can use a serializer of your choosing to turn a object into JSON
* Async JavascriptBinding - Add support for returning Task
Remove Parallel Task execution code from MethodRunnerQueue
Add ParallelMethodRunnerQueue
- For the new code path the Func is executed, if the Result is a generic Task we wait for it's completion
- If the task is not generic then we return immediately
This is only enabled when CefSharpSettings.ConcurrentTaskExecution = true;
* MethodRunnerQueue - Display error message when method returns Task
* ParallelMethodRunnerQueue - Rename to ConcurrentMethodRunnerQueue
* MethodRunnerQueue - Improve formatting of error message when method returns Task
* Async JavascriptBinding Return Task - Add Basic xUnit Test
Very quick test, needs to be refined a little. The basics are working as expected.
* Add Binding Test Async Task Example to the WPF Example menu
* Async JSB Task - Add additional tests and improve error messaging
- JavascriptMessageReceived event added to ChromiumWebBrowser/IWebBrowser
- CefSharp.PostMessage and cefSharp.postMessage added to V8Context on creation for use in Javascript
- Add PostMessageTest.html
* Serialize any Enumerable (List<T>) type to V8 object properly (Issue #2392)
Handle any enumarable, not just arrays when serializing (e.g. when calling
`IJavascriptCallback.ExecuteAsync`).
Otherwise, `System.Reflection.TargetParameterCountException` is thrown during serialization
* fixup! Serialize any Enumerable (List<T>) type to V8 object properly (Issue #2392) Handle any enumarable, not just arrays when serializing (e.g. when calling `IJavascriptCallback.ExecuteAsync`). Otherwise, `System.Reflection.TargetParameterCountException` is thrown during serialization
* fixup! fixup! Serialize any Enumerable (List<T>) type to V8 object properly (Issue #2392) Handle any enumarable, not just arrays when serializing (e.g. when calling `IJavascriptCallback.ExecuteAsync`). Otherwise, `System.Reflection.TargetParameterCountException` is thrown during serialization
CefSharp.BindObjectAsync can now take an optional config object as first param
Include additional information when binding complete
Add option for cefSharp.bindObjectAsync (starting with lowercase latters)
Add new syntax options - not entirely complete, no variant for the options object
Add ignore cache option
* Serialize Dictionary type to V8 object
Handle Dictionary type, otherwise it will be treated as class/structs and cause exception.
* Make the testcase covert IDictionary interface & ensure consistent bracket style.