Re: [cssom] Make CSSStyleSheet constructable

On 10/19/12 1:47 PM, Tab Atkins Jr. wrote:
> Components are likely to be different.  Since they all run identical
> script

Except they don't necessarily, because they can run script in response 
to user interaction, no?

 > Thus, we feel that simply relying on copy-on-write optimizations will 
lead to a bad place
> where performance is normally great, but one small tweak to your
> scripts will throw it in the toilet as you suddenly generate a
> thousand separate stylesheets on production pages.

Right, but with your proposal you'd have multiple scripts running on the 
same sheet...  You'd basically need cooperation from outside the 
component to get the sheet shared across all instances _and_ all the 
instances would have to be careful to not "tweak" it, right?

What are the use cases for components changing the CSSOM of their 
sheets?  Do we know any?

-Boris

Received on Friday, 19 October 2012 18:38:38 UTC