PSA: New JS helpers to query layout state without forcing reflow

Dão Gottwald dgottwald at
Thu Aug 10 12:18:37 UTC 2017

2017-08-02 21:11 GMT+02:00 Kris Maglione <kmaglione at>:

> Important caveats: *Please* be careful how you use this. And especially
> keep in mind that there may need to be a paint before your promise resolves
> and any dependent DOM updates happen. If you're not absolutely sure that
> that won't result in glitchy UI behavior, *please test carefully* to make
> sure that it doesn't.

I'd like to stress this. This has been a problem here:

And likely here:

I'm afraid this API is a massive footgun. :/
Can we remove this from the "performance best practices" document for now?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the firefox-dev mailing list