Skip to main content

CSSRuleList

A CSSRuleList represents an ordered collection of read-only CSSRule objects.

MDN Reference

Indexable

[index: number]: CSSRule

Methods

[iterator]()

iterator: ArrayIterator<CSSRule>;

Returns

ArrayIterator<CSSRule>


item()

item(index): CSSRule | null;

The item() method of the CSSRuleList interface returns the CSSRule object at the specified index or null if the specified index doesn't exist.

MDN Reference

Parameters

ParameterType
indexnumber

Returns

CSSRule | null

Properties

length

readonly length: number;

The length property of the CSSRuleList interface returns the number of CSSRule objects in the list.

MDN Reference