- From: John Daggett <jdaggett@mozilla.com>
- Date: Tue, 18 Sep 2012 05:12:29 -0700 (PDT)
- To: Glenn Adams <glenn@skynav.com>
- Cc: www-style list <www-style@w3.org>
Glenn Adams wrote:
> (1) If we expect this new (descriptor collection) interface to be
> reused by different rule types, then it would be best to define in
> the baseline CSSOM spec directly;
Agreed.
> (2) If we are going to make this change from the existing
> CSSFontFaceRule to a new and different definition, then we should
> define the new CSSFontFaceRule in CSS3 Fonts to keep it more closely
> tracking the other font related interfaces defined there; also, we
> should be careful to define the new version so that UAs may continue
> to support the older, DOM-2 CSS definition without member name
> collisions;
Agreed.
> (3) I would suggest the new descriptor interface to be defined as follows:
>
> interface CSSDescriptors {
> readonly attribute unsigned long length;
> DOMString item(unsigned long index);
> DOMString getDescriptor(DOMString descriptorName);
> void setDescriptor(DOMString descriptorName, DOMString descriptorValue);
> getter DOMString get(DOMString name);
> setter void set(DOMString name, DOMString value);
> stringifier; // useful to define explicitly (in prose) for supporting an outer rule.cssText
> }
>
> and that a new intermediate rule interface type be defined:
>
> interface CSSRuleWithDescriptors : CSSRule {
> readonly attribute CSSDescriptors descriptors;
> }
>
> and that CSSFontFaceRule be:
>
> interface CSSFontFaceRule : CSSRuleWithDescriptors {
> getter DOMString get(DOMString name);
> setter void set(DOMString name, DOMString value);
> }
This seems okay to some degree, I just wonder if it's not a little bit of
overkill. Why the need for getter/setter *and* getDescriptor/setDescriptor?
That almost seems java-esque.
Cheers,
John
Received on Tuesday, 18 September 2012 12:13:00 UTC