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

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


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

> 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:
https://bugzilla.mozilla.org/show_bug.cgi?id=1385729#c0
https://bugzilla.mozilla.org/show_bug.cgi?id=1358712#c5

And likely here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1356532#c22

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

dao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/firefox-dev/attachments/20170810/5c18fa33/attachment.html>


More information about the firefox-dev mailing list