MediaQueryListEvent Class

The event fired when the state of a MediaQueryList changes (https://drafts.csswg.org/cssom-view/#mediaquerylistevent).

public sealed class MediaQueryListEvent : Event
Inheritance
Event MediaQueryListEvent

Constructors

NameDescription
MediaQueryListEvent(string, MediaQueryListEventInit?)Creates an event of the given type with the media and matching state of the initialization dictionary.

MediaQueryListEvent(string, MediaQueryListEventInit?)

MediaQueryList.cs

Creates an event of the given type with the media and matching state of the initialization dictionary.

public MediaQueryListEvent(string type, MediaQueryListEventInit? eventInitDict = null)

Properties

NameDescription
MatchesGets a value indicating whether the document matches the media query list.
MediaGets the serialized media query list that changed.

Gets a value indicating whether the document matches the media query list.

public bool Matches { get; }

Gets the serialized media query list that changed.

public string Media { get; }