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: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sat, 9 Feb 2013 10:03:51 -0700
Message-ID: <CAAWBYDD569rE2+88dpVB8h9PGOpmz1aMn_bEatFPspT1AaaE2w@mail.gmail.com>
To: Cameron McCormack <cam@mcc.id.au>
Cc: Bjoern Hoehrmann <derhoermi@gmx.net>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Fri, Feb 8, 2013 at 3:55 PM, Cameron McCormack <cam@mcc.id.au> wrote:
> What about instead providing access to an object that represents the
> pseudo-element:
>   element.pseudo("::before").computedStyle.color

I think this is the ideal solution.  It's simple, unlikely to have
naming clashes, and it allows us a beautiful extension point for doing
things in the future like adding event handlers to pseudo-elements.

> Or if we event wanted to special case a few standard pseudo-elements:
>   element.before.computedStyle.color

Horrible idea. ^_^  Much more likely to have naming clashes, which
means we also have to do a compat study before naming any new
pseudo-element forever.  There is absolutely no reason to ever
special-case just a few "standard" pseudos.

Received on Saturday, 9 February 2013 17:04:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:08 UTC