Re: [csswg-drafts] [css-animations-1] CSSKeyframesRule should have index getter (#7684)

According to the [WebIDL spec](https://webidl.spec.whatwg.org/#idl-indexed-properties),

> Interfaces that [support indexed properties](https://webidl.spec.whatwg.org/#dfn-support-indexed-properties) must define an [integer-typed](https://webidl.spec.whatwg.org/#dfn-integer-type) [attribute](https://webidl.spec.whatwg.org/#dfn-attribute) named "length".

I think the change needs to be:

```diff
[Exposed=Window]
interface CSSKeyframesRule : CSSRule {
           attribute CSSOMString name;
  readonly attribute CSSRuleList cssRules;

+  getter CSSKeyframeRule (unsigned long index);
+  readonly attribute unsigned long length;

  undefined        appendRule(CSSOMString rule);
  undefined        deleteRule(CSSOMString select);
  CSSKeyframeRule? findRule(CSSOMString select);
};
```

I'm happy to do that and add the necessary WPT if no one objects.

As for `insertRule`, it doesn't appear to be in Gecko or Blink so I suppose either Webkit should drop it or file a separate issue for adding it?

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 8 September 2022 03:59:57 UTC