What you can do today, with C# (or any language that can load a C
library) is to render a page in a GL buffer, and get few events about
what's going on in the page (new title, page navigation, resize, etc.
See: 
https://github.com/servo/servo/blob/master/components/embedder_traits/lib.rs#L114).
It is quite limited as you can't manipulate the DOM, get DOM events or
access the JS context. And there is not way (yet) to pass messages
between the embedder and servo.

A deeper integration with the engine is something that has been
requested in the past, and we might eventually look at in the future.
But it's not possible yet without adding hooks all over Servo.

A possible workaround is to setup a websocket server in your C#
application that your webpage could communicate with in JS.


On Wed, May 1, 2019 at 4:17 PM <[email protected]> wrote:
>
> Hi, I was just wondering how difficult it would be to create C# wrapper for
> Servo, conceptually similar to CefSharp
> (https://github.com/cefsharp/CefSharp).
>
> What I am missing in CefSharp is methods to directly create/manipulate
> widgets, without JavaScript and/or CSS and receive events like onmouseover.
>
> It goes without saying that such functionality would allow for using Servo
> as desktop/mobile non-web application GUI engine, in a similar fashion
> Spotify uses Chromium - if I am not mistaken. I know about Avalonia
> framework (http://avaloniaui.net) but its performance is limited since
> everything above renderer is built in .Net Core.
>
> _______________________________________________
> dev-servo mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-servo
_______________________________________________
dev-servo mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to