## 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](https://www.w3.org/TR/cssom-view/#extensions-to-the-window-interface)

```csharp
public MediaQueryList MatchMedia(string query)
```

| Parameter | Type | Description |
| --- | --- | --- |
| query | String | The string containing a media query; see [https://drafts.csswg.org/mediaqueries/](https://drafts.csswg.org/mediaqueries/) for details. |

### Return Value

MediaQueryList object

### See Also

* class [MediaQueryList](../../mediaquerylist/)
* interface [IWindow](../)
* namespace [Aspose.Html.Window](../../../aspose.html.window/)
* assembly [Aspose.HTML](../../../)
