[css-houdini-drafts] [css-properties-values-api] Registering properties in JS could have performance impact (#940)

smfr has just created a new issue for https://github.com/w3c/css-houdini-drafts:

== [css-properties-values-api] Registering properties in JS could have performance impact ==
https://drafts.css-houdini.org/css-properties-values-api-1/
Registering custom properties with the JS API will force the UA to recompute style so that the newly registered properties are applies. However, there's not obvious "right" time to do this, and if the JS runs after the stylesheets have loaded, register properties will trigger potentially--expensive style recomputation.

This also adds another way to trigger expensive "forced style recalc" loops if an author registers multiple properties, asking for computed style after each registration.

For this reason the declarative approach seems preferable to using the JS API.

Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/940 using your GitHub account

Received on Friday, 23 August 2019 23:43:39 UTC