MediaList Class

https://drafts.csswg.org/cssom/#the-medialist-interface

Implements

Properties

NameDescription
CountGets the number of media queries in the list.
LengthGets the number of media queries in the list.
MediaTexthttps://drafts.csswg.org/cssom/#dom-medialist-mediatext

Gets the number of media queries in the list.

public int Count { get; }

Property value

int

Gets the number of media queries in the list.

public uint Length { get; }

MediaText

MediaList.cs

https://drafts.csswg.org/cssom/#dom-medialist-mediatext

public string MediaText { get; set; }

Indexers

NameDescription
this[int]Gets the media query at the given index.
this[uint]Gets the media query at the given index, or null when the index is out of range.

ItemAt overloads

this[int]

MediaList.cs

Gets the media query at the given index.

public string this[int index] { get; }
Parameters
index int
Property value

string

this[uint]

MediaList.cs

Gets the media query at the given index, or null when the index is out of range.

public string? this[uint index] { get; }

Methods

NameDescription
AppendMedium(string)https://drafts.csswg.org/cssom/#dom-medialist-appendmedium
DeleteMedium(string)https://drafts.csswg.org/cssom/#dom-medialist-deletemedium
GetEnumerator()Returns an enumerator that iterates through the media queries of the list.
Item(uint)Returns the media query at the given index, or null when the index is out of range.
System.Collections.Generic.IReadOnlyList<System.String>.get_Item(int)
System.Collections.IEnumerable.GetEnumerator()
ToString()Returns the serialized media query list.

AppendMedium(string)

MediaList.cs

https://drafts.csswg.org/cssom/#dom-medialist-appendmedium

public void AppendMedium(string medium)

DeleteMedium(string)

MediaList.cs

https://drafts.csswg.org/cssom/#dom-medialist-deletemedium

public void DeleteMedium(string medium)

GetEnumerator()

MediaList.cs

Returns an enumerator that iterates through the media queries of the list.

public IEnumerator<string> GetEnumerator()

Item(uint)

MediaList.cs

Returns the media query at the given index, or null when the index is out of range.

public string? Item(uint index)

System.Collections.Generic.IReadOnlyList<System.String>.get_Item(int)

string IReadOnlyList<string>.get_Item(int index)

Parameters

index int

Returns

string

No documentation is available.

System.Collections.IEnumerable.GetEnumerator()

MediaList.cs
IEnumerator IEnumerable.GetEnumerator()

No documentation is available.

ToString()

MediaList.cs

Returns the serialized media query list.

public override string ToString()