W3C home > Mailing lists > Public > public-houdini@w3.org > October 2015

Re: Typed CSSOM

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 8 Oct 2015 16:33:26 -0700
Message-ID: <CAAWBYDC_=07Oh88aDhLK=ZkR=zD=CkjY3_vj8Do7wj3cMLXY6A@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: "public-houdini@w3.org" <public-houdini@w3.org>
On Thu, Oct 8, 2015 at 4:00 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 8/9/15 9:05 PM, Shane Stephens wrote:
>> A new OM can't just start to replace existing CSSOM functionality with
>> typed versions because this will break lots of things. Instead we should
>> create a new interface, StylePropertyMap, that is accessible alongside
>> the old methods:
> Note that there is a certain similarity here to the existing
> getPropertyCSSValue stuff.  Can you summarize what this new API does better?


1. Not completely broken when we turn a property into a shorthand, or
a list.  gPCV required it to start returning null or a list value
type, which breaks code.

2. No numeric constants to shoehorn everything into a single terrible
interface (CSSValue and CSSPrimitiveValue)

3. Actually handles arbitrarily complicated property syntaxes (gPCV
failed if the property contained more than a single value, falling
back to strings).  (Some aspects of this are upcoming.)

4. Generally just uses JS properly, rather than pretending that we're
writing Java?

Received on Thursday, 8 October 2015 23:34:13 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 8 October 2015 23:34:14 UTC