Re: [cssom] Proposal for obtaining robust style information via Javascript - getStyle()

On 7/02/13 10:16 AM, Bjoern Hoehrmann wrote:
> I am wondering how people would react if one was to suggest to allow
>
>    element.computedStyle.color
>
> and also
>
>    element.computedStyle("::before").color

To me that looks a bit strange.  As Anne says we have decided that 
callable objects (that are more than just plain Functions) are something 
to avoid.

What about instead providing access to an object that represents the 
pseudo-element:

   element.pseudo("::before").computedStyle.color

Or if we event wanted to special case a few standard pseudo-elements:

   element.before.computedStyle.color

Received on Friday, 8 February 2013 22:56:13 UTC