This page is In Progress

Notice: The WebPlatform project has been discontinued when the Stewards partnership agreement ended in September 2015. This site has been frozen, and the assets we have created will remain.

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