[Webkit-unassigned] [Bug 241420] [WPE][GTK] Drop _in_world variants of run_javascript APIs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 1 06:47:05 PST 2023


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

--- Comment #4 from Michael Catanzaro <mcatanzaro at gnome.org> ---
(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.

> I don't know what to do with
> webkit_web_view_run_javascript_from_gresource(). It doesn't have the
> in_world variant, nor the async functiona call. I think we can just remove
> it from the new API, callers can read the resource first and then use
> evaluate or call.

It's convenient, but OK.

-- 
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/20230201/85e79c32/attachment.htm>


More information about the webkit-unassigned mailing list