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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 31 Jan 2013 18:34:10 -0800
Message-ID: <CAAWBYDCWGLn3u2hd0peAHUmUk1HGR5i=+KiymR95Tw95fS=bdg@mail.gmail.com>
To: "L. David Baron" <dbaron@dbaron.org>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>
On Thu, Jan 31, 2013 at 6:25 PM, L. David Baron <dbaron@dbaron.org> wrote:
> I'd actually rather have separate methods or (probably preferably)
> getters for each sort of value we'd want to return (the set is
> pretty small) than have string arguments for "specified",
> "computed", etc.
> For example, maybe something like:
>   element.specifiedStyle.color
>   element.computedStyle.color
>   element.usedStyle.color
>   element.pseudoStyle("::before").specifiedStyle.color

Hm, that seems quite nice.  Are you okay with the actual property
accessors being lazy, so you don't necessarily have to do a lot of
value computation up-front?

For the last one, this could give us an excuse to finally reify
pseudo-elements as DOM constructs, for the return value of your
pseudoStyle() function (though I'd call it something else).

Received on Friday, 1 February 2013 02:34:56 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:08 UTC