Commit Graph

30 Commits

Author SHA1 Message Date
Alex Maitland 8d7a169590 Change Frame identifier from Int64 to String (#4740)
* Change Frame identifier from Int64 to String

Issue https://github.com/cefsharp/CefSharp/issues/4737

* Fix SetCanExecuteJavascriptOnMainFrame frameId parsing

* Add tests

* NetCore Tests - Install missing packages
2024-03-09 06:55:27 +10:00
Alex Maitland 0a1a8855c5 Core - Add IBrowser.IsValid
- Add IBrowser.IsValid
- Update xml doc comments
- Remove ExecuteScriptAsync CanExecuteJavascriptInMainFrame check as CEF should now internally queue commands for ExecuteScript and LoadRequest

https://bitbucket.org/chromiumembedded/cef/issues/2421/add-onframecreated-onframedeleted#comment-60616371

Issue #3588
2021-07-22 13:27:36 +10:00
Alex Maitland fd46a4c145 Core - Add EvaluateScriptAsPromiseAsync (#3251)
- 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)
2020-10-06 15:19:37 +10:00
amaitland 10d52419f3 xml doc improvements 2020-01-29 10:22:18 +10:00
amaitland 60a1f640cf CEF Upgrade - Breaking Changes
- Remove CefSettings.EnableNetSecurityExpiration
- Remove RequestContextSettings.EnableNetSecurityExpiration
#2954

- Remove IFrame.LoadStringForUrl and IWebBrowser.LoadString
Resolves #2955
2019-11-03 12:33:45 +10:00
amaitland 0979a4de2a IFrame.LoadRequest - Add xml doc warning
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
2019-10-28 12:08:28 +10:00
David M Iserovich a843407dab Core - Add IURLRequest #1721 (#2881)
* 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
2019-10-01 20:11:10 +10:00
Chris bef5dd37c4 Maintenance - Fixed formatting, file encoding, and copyright year (#2504)
* Applied formatting

* Fixed file encoding + Updated copyright year

* Updated License

* Fixed more file encoding

* Copyright notice now shows the year the file was created
2018-09-10 10:41:13 +10:00
amaitland 9c79dfeb2c IFrame.LoadRequest - Update xml doc
LoadRequest can only be called when a render process has already been created, suggest loading a data uri initially

http://magpcss.org/ceforum/viewtopic.php?f=6&t=16058&p=38563&hilit=LoadRequest#p38559

Resolves #2451
2018-07-13 10:28:25 +10:00
amaitland 85f80471bb IFrame - Add additional xml comment, the underlying CEF framework will return a invalid frame with a identifier < 0
CefSharpBrowserWrapper::GetFrame - Only return frame if a valid reference is obtained
2017-03-07 11:05:31 +10:00
Chris cd934267c6 Updated copyright year and made sure it used same format everywhere (#1966) 2017-03-06 08:44:37 +10:00
amaitland f2050a0861 Add scriptUrl and startLine to EvaluateScriptAsync 2016-12-02 06:10:40 +10:00
amaitland bc298f6415 Add GetSource and GetText methods that take an IStringVisitor 2016-05-29 22:21:32 +10:00
amaitland bae3c28e92 Update copyright to 2016 2016-01-11 14:11:30 +10:00
amaitland 3b2bd43880 Add initializePostData param to CreateRequest - simplifies the initialization of the CefPostDataWrapper, basically if you know that you'll need to use PostData then initialize up front 2015-11-29 06:19:35 +10:00
amaitland d5bde1cdfc Expose IFrame.LoadRequest
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.
2015-11-25 08:30:38 +10:00
Atvaark b04ccbb269 Add missing comments 2015-11-04 13:10:00 +10:00
amaitland 6e67ef9446 IFrame.EvaluateScriptAsync default timeout to null (default value on interface)
Change String to string for consistency
2015-09-01 19:16:32 +10:00
amaitland 330e6b38b0 Add IsDisposed property to interface objects
Fixes #1223
2015-08-31 13:32:48 +10:00
amaitland e81fbb7134 Fix/add some more xml comments 2015-07-31 14:40:07 +10:00
amaitland 382683d7b1 Fix up IFrame xml comments 2015-07-31 14:33:39 +10:00
amaitland 0c2cd86e1b Make IFrame and IBrowser implement IDisposable (The underlying implementation already does, just not the interface) 2015-05-28 19:51:14 +10:00
amaitland d0d409a8fd Rename LoadHtml to LoadStringForUrl (Internal method is LoadString, for some reason that causes the compiler a problem as there is a define already aliasing LoadString).
LoadHtml was a somewhat conflicting name with the LoadHtml extension methods that use a ResourceHandler to load the html
2015-05-27 17:44:03 +10:00
amaitland 9defed9a42 Add disclaimer
Remove unused references
2015-05-21 20:28:22 +10:00
amaitland 2f40861dca Use default params on the IFrame interface to provide the ExecuteJavaScriptAsync overload 2015-05-21 13:51:45 +10:00
Bill Tutt 21efc10628 Use .Net friendly property names. 2015-05-04 19:15:57 -04:00
Bill Tutt ac0b52d646 Return Async task for GetSource/GetText based on review. 2015-05-04 18:52:34 -04:00
Bill Tutt 3d4f2a76d6 Add extra overload based on feedback. 2015-05-04 18:39:17 -04:00
Bill Tutt 140defb5b6 More license blocks. 2015-05-02 00:09:24 -04:00
Bill Tutt e1e58a5da6 Add IFrame interface as the public face of CefFrameWrapper.
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?
2015-05-02 00:01:31 -04:00