This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

matchMedia

Method of css/media_queriescss/media_queries

Syntax

var object = object.matchMedia();

Return Value

Returns an object of type DOM NodeDOM Node

Type: HRESULT

This method can return one of these values.

S_OK

Notes

Remarks

The following example creates a media query that checks whether the width or height of a window is less than a certain size.

Syntax

Standards information

Parameters

mediaQuery [in]
Type: DOMString
retVal [out, retval]
Type: MediaQueryList

See also

Related articles

Media Queries

Related pages

  • Window

Attributions