You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// [CSSStyleSheet.insertRule] and [CSSStyleSheet.deleteRule], which are methods
297
297
/// of [CSSStyleSheet].
298
298
///
299
-
/// The interface has no constructor. An instance of `CSSRuleList` is returned
300
-
/// by [CSSStyleSheet.cssRules] and [CSSKeyframesRule.cssRules].
299
+
/// This interface was an
300
+
/// [attempt to create an unmodifiable list](https://stackoverflow.com/questions/74630989/why-use-domstringlist-rather-than-an-array/74641156#74641156)
301
+
/// and only continues to be supported to not break code that's already using
302
+
/// it. Modern APIs represent list structures using types based on JavaScript
/// thus making many array methods available, and at the same time imposing
305
+
/// additional semantics on their usage (such as making their items read-only).
301
306
///
302
-
/// > **Note:** This interface was an
303
-
/// > [attempt to create an unmodifiable list](https://stackoverflow.com/questions/74630989/why-use-domstringlist-rather-than-an-array/74641156#74641156)
304
-
/// > and only continues to be supported to not break code that's already using
305
-
/// > it. Modern APIs use types that wrap around ECMAScript array types instead,
306
-
/// > so you can treat them like ECMAScript arrays, and at the same time impose
307
-
/// > additional semantics on their usage (such as making their items
308
-
/// > read-only).
307
+
/// These historical reasons do not mean that you as a developer should avoid
308
+
/// `CSSRuleList`. You don't create `CSSRuleList` objects yourself, but you get
309
+
/// them from APIs such as [CSSStyleSheet.cssRules] and
310
+
/// [CSSKeyframesRule.cssRules], and these APIs are not deprecated. However, be
311
+
/// careful of the semantic differences from a real array.
0 commit comments