This topic has not yet been rated - Rate this topic

matchMedium method

[This documentation is preliminary and is subject to change.]

Gets a value that indicates whether the specified media is supported by the object that displays the document object. This allows you to query the media or device, such as a mobile device, and customize the presentation from JavaScript.

Internet Explorer 9

Syntax

var retval = StyleMedia.matchMedium(mediaQuery);

Standards information

There are no standards that apply here.

Parameters

mediaQuery [in]

Type: BSTR

The media query to match.

Return value

Type: Boolean

A Boolean value that indicates whether the media type of the object matches the media type that the mediaQuery parameter specifies.

Remarks

The mediaQuery parameter can contain a string that specifies a media type, an optional well-formed Cascading Style Sheets (CSS) media query, or both. For more information on Media Queries, see Media Queries.

See also

StyleMedia
CSS3 Media Queries Module
Internet Explorer Test Drive: CSS3 Media Queries
CSS3 Media Queries (IE Team Blog post)
Respond to Different Devices With CSS3 Media Queries (Script Junkie)

 

 

Build date: 3/14/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ