Re: [csswg-drafts] [cssom] Don't describe CSSStyleDeclaration getters/setters using "macro" Web IDL

I'm not sure about all the constraints here, but I was imagining a getter and setter with prose explaining what it does. Maybe:

```WebIDL
getter DOMString (DOMString name);
setter void (DOMString name, DOMString value);
```

Although it isn't that simple in Blink right now:
```WebIDL
// The camel-cased and dashed attribute getters have custom bindings.
// https://dev.w3.org/csswg/cssom/#dom-cssstyledeclaration-camel-cased-attribute
// https://dev.w3.org/csswg/cssom/#dom-cssstyledeclaration-dashed-attribute
[Custom=(PropertyGetter,PropertyEnumerator,PropertyQuery)] getter (DOMString or float) (DOMString name);
[Custom] setter void (DOMString property, DOMString? propertyValue);
```

@doomdavve @rune-opera, would either of you happen to know the quirks of this API to say how the spec could be expressed using "plain" Web IDL?

Maybe the enumeration is what makes it all hard, is there such a thing as a custom enumerator in Web IDL? Would it be work to make the interface `maplike<>`, or would that create another kind of mess?

-- 
GitHub Notification of comment by foolip
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1089#issuecomment-285348639 using your GitHub account

Received on Thursday, 9 March 2017 13:17:46 UTC