-
-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve IPC #79
Comments
Hi! I just found that project, great to see a Servo based browser being worked on :) I'm not sure I understand correctly the design used here, so bear with me if this is nonsense:
I have a couple of questions:
Firefox UI is build with markup languages (XUL, and mostly HTML now) that use a special element ( In Servo that would require implementing a new element (maybe a custom element cheers! |
Yes, this is basically the problem, except Verso doesn't use any other GUI toolkit. It still uses Webrender to render everything. That's why I tried to find some way to decorate the view. One of the main purposes of this project is to explore Servo's own UI solution.
We will probably create another type of webview(which is basically a top-level browsing context). I already have another type called context menu in my mind. It should be able to handle the tasks you mentioned.
I believe Servo used to have features like this and there was a demo: https://github.com/browserhtml/browserhtml I hope this clarifies and answers your questions. Thanks for your feedback! |
I just realized the URL scheme of these custom webview (panel, context menu,... etc.) should be |
Thanks for you response! About the security issue with the |
From my experience, the idea of As of now, the design of
|
Firefox's XUL is just a markup language, similar to HTML. It took a long time to switch because XUL had a better box model until flexbox appeared and migrating was a huge task. XUL itself has nothing to do with XPCOM, which people sometimes confuse especially when talking about Firefox "XUL extensions". Anyway, I agree that we should open a Servo issue - I just hoped you would see the benefit it could bring to this project. I'm convinced it would simplify a lot your UI development, instead of the mix of html panels and direct WebRender access. |
I created the discussion in Servo: servo/servo#32883 |
At the moment we exploit the following types to communicate between Panel webview and Verso embedder itself:
EmbedderMsg::Prompt
EmbedderEvent::Keyboard
andKey::Character
can contain a string. webview can listen to "keyup"/"keydown" and check if the string is a message.While they can do their jobs, it doesn't seem like an ideal and ergonomic approach. We should evaluate better ways to do it. One method is adding register_uri_scheme, which is a fairly common feature for many webview libraries. But this only solves the problem of webview sending messages to embedder. We still need a way for embedder to send messages to webview proactively.
Despite how funny
EmbedderEvent::Keyboard
exploit is, I do like that webview can add an event listener to receive messages from embedder. Perhaps servo can publicscript
crate'sdom
module for embedder to implement their custom Web API to achieve this?The text was updated successfully, but these errors were encountered: