[Webkit-unassigned] [Bug 238598] New: [WPE][GTK] Missing API to pass client-side messages to new pages on the web extension side
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Mar 31 02:18:10 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=238598
Bug ID: 238598
Summary: [WPE][GTK] Missing API to pass client-side messages to
new pages on the web extension side
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WPE WebKit
Assignee: webkit-unassigned at lists.webkit.org
Reporter: csaavedra at igalia.com
CC: bugs-noreply at webkitgtk.org
While it is possible to pass client-side messages to a web page right after a view has been created (with the webkit_web_view_send_message_to_page() API), there's no way for the WebView to know if the web process has created a new page (due to navigation, for example), in order to send a message to that new page, for cases when data should be available to a specific page and not to all via web extension data.
There could be two independent approaches to do this, both would require some new API in WebKit:
1. For data that is immutable, one could mimic webkit_web_context_set_web_extensions_initialization_user_data() and add a webkit_web_view_set_web_page_initialization_data() method that would allow passing of initialization data to pages. Then on the web extension side, one could call a webkit_web_page_get_initialization_data() method (for example, in the "page-created" signal handler), in order to get that data. This would not allow to pass arbitrary messages any time that a new page is created, though.
2. For the latter, an alternative would be to have a WebKitWebView:page-created signal that can be used to send a new message via the existing webkit_web_view_send_message_to_page() method, if needed.
These approaches are complementary and both could be implemented, for our use-case either would work, so the idea is to discuss here possible drawbacks and a course of action before starting any implementation.
--
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/20220331/d9b84cd7/attachment.htm>
More information about the webkit-unassigned
mailing list