For browser.html, we need something a bit more sophisticated than the
servo binary (glutin port).

I’m looking for a way to build a runtime that would load a JS file,
execute it and quit only once script and callbacks are all executed or
when the event loop get a special “quit” event. Like nodejs. This JS
file would have access to special APIs (`new BrowserWindow(url)`) to
open a glutin window and render the page with Servo, but this script
needs to be able to run without any window.

That would mean an event loop per window, and an event loop for the
initial JS file.

I don’t want to implement a dedicated event loop for the initial JS
file. I imagine that Servo comes with mechanisms to run event loops. I
was thinking about using a headless compositor and a worker (which
would come with setTimeout & co). I also found some event loop
implementations on crates.io.

What would be the right way to build that?

The goal is to replicate what Github’s Electron does. Some relevant links:

- http://electron.atom.io
- http://electron.atom.io/docs/v0.30.0/tutorial/desktop-environment-integration/
- http://electron.atom.io/docs/v0.30.0/api/app/
- http://electron.atom.io/docs/v0.30.0/api/browser-window/

-- 
Paul
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to