Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

I just asked pcwalton in #servo on mozilla and he said they want to introduce async versions of all of the DOM APIs like getBoundingClientRectAsync()


sort by: page size:

Yes! This has me quite excited about Servo. Chrome is interested in async APIs for these as well.

Random aside: Dart's DOM originally offered these properties only as async but developers were unhappy with the ergonomics so Dart ended up delivering the sync APIs. :/


> In Servo, how do you do interaction with the DOM like `clientHeight`? It just pauses the entire JS engine while it goes and talks to the UI thread?

Yes, but we'd like to experiment with new APIs in the future like `getBoundingClientRectAsync()` that will allow pages to do that kind of thing asynchronously.


Last time I checked, the Servo team also had plans to execute JS off the main thread and introduce async versions of DOM APIs to enable better parallelism: https://news.ycombinator.com/item?id=9011215

Servo is by far the technology I'm most excited about as a frontend developer. It will be a complete game changer for web performance once all the pieces are in place.


I want response from Firefox/Servo devs. They need async http requests and they have experience in using those.

That's amazing. I hadn't even though about Servo in light of all of this.

In current browsers, JavaScript runs in the same thread as the UI, right? In Servo, how do you do interaction with the DOM like `clientHeight`? It just pauses the entire JS engine while it goes and talks to the UI thread?

Maybe we should be thinking of all of this in terms that map well to Servo's current architecture.

EDIT: What's really exciting about Servo is that hopefully the architecture's parallelism is really sound, even if certain properties of the current web restrain it. Then we can work on ways to remove those properties, and in Servo it's a simple switch to turn on more and more parallelism.


IIRC, Servo implements the WebKit embedding API, so it wouldn't be too far-fetched to have a node-servo (although Mozilla are using Spidermonkey and not V8 as the JS engine)

> It wouldn't be surprise if their Next Goal were to built the Entire ( or Most of ) Browser with Javascript.

Firefox is that already, the UI is XUL (that's one of the reasons why things like Firebug could exist as a plugin, when Chrome and Safari plugins are essentially glorified greasemonkey scripts). But you still need the core engine to run that javascript (and a bunch of other stuff) somehow, and one of the ideas behind Servo is that you could do so with much more concurrency and reactivity than is currently done.


I'd rather see the node-servo version ;)

As far as I understand, Servo will come with a WebKit embedding API, so the possibilities are pretty much endless.


Servo has very little to do with JavaScript, so no.

The parts of Servo that made it into Firefox are still being worked on by Firefox developers. I don't know how much activity is happening on the now-external Servo project itself.


While there are still lot of work to be done on servo. I wonder if other browser engine be able to benefits from the research mozilla has done. Like Webkit / Blink.

Or will this require some major rewrite?


Servo uses an existing JS interpreter (SpiderMonkey, the one used in Firefox) but does implement all of the Web APIs itself.

As far as I know there are no short- or even mid-term plans to integrate Servo into Firefox. It's still a research project first. Rust for example doesn't even have a stable API yet.

This is fantastic news. Servo has been doing exciting work, and it was disappointing to hear that Mozilla had disbanded the Servo team. I'm really excited to see where this will go. Will improvements from Servo continue to make their way down into Firefox?

Are they planning on implementing a JavaScript engine in Servo as well?

So far it's only been used in Servo, their next-gen browser project.

We may need more time. IIRC, Firefox is incorporating some code written in Rust, and there's also Servo.

Wait, Servo is the core browser engine of Firefox isn't it? Do they intend to become FF another Webkit-based browser?

Servo uses SpiderMonkey as its JS engine, and supports some DOM apis.

Servo has JavaScript own and collect the DOM nodes. At least, it did in 2014. https://research.mozilla.org/2014/08/26/javascript-servos-on...
next

Legal | privacy