- Add useImmediatelyInvokedFuncExpression param to EvaluateScriptAsync which wraps the script in an IIFE
with the cefSharpInternalCallbackId variable defined in scope to allow for deferred completion
- Wrap script in Immediately Invoked Function Expression and call promise.resolve to guarantee a promise.
- Return 'CefSharpDefEvalScriptRes' as the result of the js function to defer execution of the callback
- Call newly added cefSharp.sendEvalScriptResponse method in javascript when promise has been resolved/rejected
This is built up of a few parts and can technically be used by the new user to defer the response until they are ready.
Just return `'CefSharpDefEvalScriptRes'` and manually call cefSharp.sendEvalScriptResponse using the cefSharpInternalCallbackId
variable which is injected into the script execution (wrapped in an IIFE to limit scope)
WARNING: This method will fail with "bad IPC message" reason
INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the
request origin using some other mechanism (LoadURL, link click, etc).
Resolves#2932
* Core - Add IURLRequest #1721
Add IURLRequest, IURLRequestClient, and GetURLRequest to IFrame
* Rename URL classes to Url, add xmldoc and licenses
* Add UrlRequestClient to CefSharp.Example, more minor cleanup
* Getters
* Rebase tweaks
* Fix filenames, remove unused
* Use UnmanagedMemoryStream instead of byte array for IUrlRequestClient.OnDownloadData
* Applied formatting
* Fixed file encoding + Updated copyright year
* Updated License
* Fixed more file encoding
* Copyright notice now shows the year the file was created
Add IFrame.CreateRequest to instantiate a new instance of the CefRequestWrapper
Was planning on using VC++ extensions methods, have yet to get that working, so for now just have a method on the IFrame interface directly.
IRequestHandler: Pass IFrame instances instead of isMainFrame.
Support EvaluateJavaScriptAsync from a frame.
IBrowserAdapter, IBrowserAdapterNative: Dependency breaking between CefFrameWrapper and ManagedCefBrowserAdapter.
Add IBrowserAdapter.BrowserAdapter to IWebBrowserInternal and implment for all controls.
This builds, but hasn't been tested yet. Thoughts?