What is getComputedStyle supposed to be for?

I think I'm confused about what the intent is of getComputedStyle.  On
seeing the name I thought that it would give me access to the final
properties of elements but, since these "actual values" can be different
from the calculated values this isn't it.

I thought maybe the idea was to give access to as much style sheet
information as was available before any user agent specific information was
used (sort of like "specified value" except without resolving inherited to
the value of the parent element since that is a computed value).  I don't
think this is it since, to convert from relative to absolute values in some
cases, detailed information about the user agent's font and pixel size need
to be used.  Not to mention the user agent style sheet, target media, and
initial containing block size.

So it seems that a way of accessing specified, computed, or actual values
could have been provided and it was chosen to provide access to the computed
values.  Why?

How was getComputedStyle intended to be used and by whom?

I'm new here so apologies if this has been asked and answered before.

Thanks

Received on Monday, 5 November 2001 18:04:01 UTC