W3C home > Mailing lists > Public > www-style@w3.org > August 2013

Re: [cssom] Methods instead of attributes for usedStyle et al

From: Simon Pieters <simonp@opera.com>
Date: Tue, 13 Aug 2013 22:13:59 +0200
To: "www-style@w3.org" <www-style@w3.org>, Fran├žois REMY <francois.remy.dev@outlook.com>
Message-ID: <op.w1ruhlpjidj3kv@simons-macbook-pro.local>
On Tue, 13 Aug 2013 21:34:52 +0200, Simon Pieters <simonp@opera.com> wrote:

> You're right. For some reason I thought getComputedStyle was static in  
> implementations, but it's live in WebKit/Blink/Gecko/IE10:
> http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2448
> So the spec needs to be fixed to say that getComputedStyle is live.
> This information also means that the GetStyleUtils can be changed back  
> to attributes, and we can make them return the same live object each  
> time.

Done https://dvcs.w3.org/hg/csswg/rev/e605b1398664

> getComputedStyle returns a new object each time even if it gets invoked  
> with the same arguments in WebKit/Blink/Gecko, but not in IE10:
> http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2449
> Does anyone have an opinion about which is better, or should I just go  
> with the majority? Is getComputedStyle often invoked with the same  
> arguments in a tight loop in the wild?

Or, on the flip side, is it often invoked with different arguments, but  
not multiple times with the same arguments?

Or both?

Simon Pieters
Opera Software
Received on Tuesday, 13 August 2013 20:09:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:33 UTC