You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The existing CefFrame::ExecuteJavaScript method does not currently support a result callback. The related Chromium implementation (RenderFrameHost::ExecuteJavaScript) does support a result callback.
Describe the solution you'd like
Add a variant of CefFrame::ExecuteJavaScript with a result callback.
Describe alternatives you've considered
Result callback functionality can currently be implemented using CefV8Context::Eval and CefMessageRouter. However, that is substantially more complicated for clients.
Additional context
It might also be nice to expose ExecuteJavaScriptMethod as an alternative to ExecuteJavaScript. From the Chromium docs:
// This API allows to execute JavaScript methods in this frame, without
// having to serialize the arguments into a single string, and is a lot
// cheaper than ExecuteJavaScript below since it avoids the need to compile
// and evaluate new scripts all the time.
//
// Calling
//
// ExecuteJavaScriptMethod("obj", "foo", [1, true], callback)
//
// is semantically equivalent to
//
// ExecuteJavaScript("obj.foo(1, true)", callback)
This would also benefit from a more concise way to construct CefListValue objects (e.g. [1, true] in the above example).
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The existing CefFrame::ExecuteJavaScript method does not currently support a result callback. The related Chromium implementation (RenderFrameHost::ExecuteJavaScript) does support a result callback.
Describe the solution you'd like
Add a variant of CefFrame::ExecuteJavaScript with a result callback.
Describe alternatives you've considered
Result callback functionality can currently be implemented using CefV8Context::Eval and CefMessageRouter. However, that is substantially more complicated for clients.
Additional context
It might also be nice to expose ExecuteJavaScriptMethod as an alternative to ExecuteJavaScript. From the Chromium docs:
This would also benefit from a more concise way to construct CefListValue objects (e.g.
[1, true]
in the above example).The text was updated successfully, but these errors were encountered: