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:23:44 -0800
Message-ID: <CAAWBYDB_SYEQ2d0pJZUoWESoW6y64X7AQQVeCx-jRDA2eHkJWQ@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-style list <www-style@w3.org>
On Thu, Jan 31, 2013 at 6:21 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 1/31/13 9:11 PM, Tab Atkins Jr. wrote:
>> In that case, let's get this done.  Francois' outline of a solution
>> earlier in this thread sounds great to me.  The only thing I'd change
>> is to make the property name optional too, in which case it's
>> identical to calling getComputedStyle() on the element.
> So it returns a string if you pass in the property name but a random live
> object if you don't?

Wait, getComputedStyle is a live object?  Jeezus.  Nah, let's just
return a dead object.  It's for when you do need to request multiple
properties, without having to retype the function multiple times (or
get the UA to recompute things multiple times, if it can save effort
by combining things).

> Also, in terms of argument order, I would think that the type of style would
> be specified more often than a pseudo-element, but maybe I'm wrong...

Yeah, Mike's proposal swaps the order as well.  Probably good to do.
Alternately: arguments object.

Received on Friday, 1 February 2013 02:24:30 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:26 UTC