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: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 07 Feb 2013 01:53:08 +0100
To: Anne van Kesteren <annevk@annevk.nl>
Cc: public-script-coord@w3.org
Message-ID: <ift5h85l59c0d8k6dudtbcipn0uoi17o3l@hive.bjoern.hoehrmann.de>
* Anne van Kesteren wrote:
>On Wed, Feb 6, 2013 at 11:16 PM, Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
>> I am wondering how people would react if one was to suggest to allow
>>
>>   element.computedStyle.color
>>
>> and also
>>
>>   element.computedStyle("::before").color
>
>Unless I'm missing something, that's a variant of
>http://dev.w3.org/2006/webapi/WebIDL/#idl-legacy-callers which would
>not be desirable.

As I recall it, before `caller` was renamed `legacycaller`, there was
some interest in making such APIs for reasons other than documentation
of existing interfaces, and the main reason for the renaming was that
this was somewhat non-idiomatic, unnecessary, unusual, at the time. As
that was some years ago, times may have changed. The alternatives here
are not particularily nice either, like making computedStyle a method
with an optional parameter, or the separate method for pseudo-elements
in David's message.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Thursday, 7 February 2013 00:53:35 UTC

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