W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2017

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

From: Philip Jägenstedt via GitHub <sysbot+gh@w3.org>
Date: Thu, 09 Mar 2017 13:17:40 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-285348639-1489065459-sysbot+gh@w3.org>
I'm not sure about all the constraints here, but I was imagining a getter and setter with prose explaining what it does. Maybe:

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

Although it isn't that simple in Blink right now:
// 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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:09 UTC