// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // // API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web). // Attributions and copyright licensing by Mozilla Contributors is licensed // under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/. // Generated from Web IDL definitions. // ignore_for_file: unintended_html_in_doc_comment @JS() library; import 'dart:js_interop'; import 'css_highlight_api.dart'; import 'css_properties_values_api.dart'; import 'css_typed_om.dart'; /// The **`MediaList`** interface represents the media queries of a stylesheet, /// e.g. those set using a `link` element's `media` attribute. /// /// > **Note:** `MediaList` is a live list; updating the list using properties /// > or methods listed below will immediately update the behavior of the /// > document. /// /// --- /// /// API documentation sourced from /// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/MediaList). extension type MediaList._(JSObject _) implements JSObject { /// The **`item()`** method of the [MediaList] interface returns the media /// query at the specified `index`, or `null` if the specified `index` doesn't /// exist. external String? item(int index); /// The `appendMedium()` method of the [MediaList] interface adds a media /// query to the list. If the media query is already in the collection, this /// method does nothing. external void appendMedium(String medium); /// The `deleteMedium()` method of the [MediaList] interface removes from this /// `MediaList` the given media query. external void deleteMedium(String medium); /// The **`mediaText`** property of the [MediaList] /// interface is a that returns a string representing the /// `MediaList` as text, and also allows you to set a new `MediaList`. external String get mediaText; external set mediaText(String value); /// The read-only **`length`** property of the [MediaList] interface returns /// the number of media queries in the list. external int get length; } /// An object implementing the `StyleSheet` interface represents a single style /// sheet. CSS style sheets will further implement the more specialized /// [CSSStyleSheet] interface. /// /// --- /// /// API documentation sourced from /// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet). extension type StyleSheet._(JSObject _) implements JSObject { /// The **`type`** property of the [StyleSheet] /// interface specifies the style sheet language for the given style sheet. external String get type; /// The **`href`** property of the [StyleSheet] /// interface returns the location of the style sheet. /// /// This property is read-only. external String? get href; /// The **`ownerNode`** property of the /// [StyleSheet] interface returns the node that associates this style sheet /// with the document. /// /// This is usually an HTML /// [``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link) /// or /// [`