MediaList extension type
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.
- on
- Implemented types
- Available extensions
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- length → int
-
The read-only
length
property of the MediaList interface returns the number of media queries in the list.no setter - mediaText ↔ String
-
The
mediaText
property of the MediaList interface is a that returns a string representing theMediaList
as text, and also allows you to set a newMediaList
.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
appendMedium(
String medium) → void -
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. -
deleteMedium(
String medium) → void -
The
deleteMedium()
method of the MediaList interface removes from thisMediaList
the given media query. -
item(
int index) → String? -
The
item()
method of the MediaList interface returns the media query at the specifiedindex
, ornull
if the specifiedindex
doesn't exist. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited