[Webkit-unassigned] [Bug 241420] [GLib] Reconsider JavaScript execution APIs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 2 01:20:21 PST 2023


https://bugs.webkit.org/show_bug.cgi?id=241420

--- Comment #5 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to Michael Catanzaro from comment #4)
> (In reply to Carlos Garcia Campos from comment #3)
> > void webkit_web_view_evaluate_javascript(WebKitWebView* webView, const char*
> > script, const char* worldName, GCancellable* cancellable,
> > GAsyncReadyCallback callback, gpointer userData)
> > 
> > void webkit_web_view_call_async_javascript_function(WebKitWebView* webView,
> > const char* body, GVariant* arguments, const char* worldName, GCancellable*
> > cancellable, GAsyncReadyCallback callback, gpointer userData)
> 
> Sounds fine to me. Please get more opinions though (at least from Adrian and
> Phil).
> 
> It's _slightly_ confusing that only the second function name contains the
> word "async" when they're both async, but I see why it's done that way: the
> webkit_web_view_call_async_javascript_function() only works for a JS
> function that returns a Promise.

async in this case doesn't refer to the API call, but to the js function, see https://tc39.es/ecma262/multipage/ecmascript-language-functions-and-classes.html#sec-async-function-definitions

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230202/13a77e97/attachment.htm>


More information about the webkit-unassigned mailing list