Re: [css-variables] How to spec the OM for vars?

On Fri, Aug 24, 2012 at 1:21 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 8/23/12 9:57 PM, Boris Zbarsky wrote:
>
>> On 8/23/12 6:33 PM, Glenn Adams wrote:
>>
>>> My current thinking is to *only* define getter/setter and have it cover
>>> the existing CSS2Properties etc rather than define new partial
>>> interfaces ad infinitum.
>>>
>>
>> As I said in my reply to Tab, I'm somewhat opposed to that.
>>
>> Note also that if you do it that way page script won't be able to hook
>> the getters and setters for CSS properties, which is also not that great.
>>
>
> And another problem: the change would not be backwards-compatible.  If you
> moved the existing attributes to a "getter" setup and a web page had this:
>
>   Object.prototype.display = 5;
>
> then suddenly .style.display would stop working, whereas right now it
> works in that situation in all browsers.
>
> I, personally, am not willing to take web compat risks like that in Gecko,
> especially when I don't see much of an upside.


how about a hybrid approach? e.g., define the current set of CSS2.1
properties found in CSS2Properties as individual attributes, and use g/s
for other properties; btw, i also notice that some browsers have a practice
of leaving undefined those CSS2Properties they don't support semantically
(e.g., FF doesn't define any of the aural props as IDL attributes on
CSSStyleDeclaration [1])

[1]
http://hg.csswg.org/test/raw-file/tip/contributors/gadams/incoming/cssom/cssstyledeclaration-instance-named-properties-in-css2x-aural.xht

Received on Friday, 24 August 2012 06:36:30 UTC