W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2013

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

From: Cameron McCormack <cam@mcc.id.au>
Date: Sat, 09 Feb 2013 09:55:42 +1100
Message-ID: <5115826E.4060606@mcc.id.au>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
CC: public-script-coord@w3.org
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

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:09 UTC