IWindow.MatchMedia

IWindow.MatchMedia method

Returns a new MediaQueryList object that can then be used to determine if the document matches the media query string, as well as to monitor the document to detect when it matches (or stops matching) that media query. See CSSOM View Module specification: https://www.w3.org/TR/cssom-view/#extensions-to-the-window-interface

public MediaQueryList MatchMedia(string query)
ParameterTypeDescription
queryStringThe string containing a media query; see https://drafts.csswg.org/mediaqueries/ for details.

Return Value

MediaQueryList object

See Also