Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class GLOBALS

    Object
       |
       +--GLOBALS

class GLOBALS

Method Summary
`<static> Object` | `testMediaQuery(str)` Execute a media query to determine what the browser supports

Method Detail

### testMediaQuery

    <static> Object testMediaQuery(str)

Execute a media query to determine what the browser supports

This function will attempt to execute a CSS3 Media Query to determine if the browser supports the given media types or media features. This is essentially the same as specifying a style sheet rule using media queries, only in JavaScript instead.

Example usage:

    if (testMediaQuery("handheld")) { ... }

or

    if (testMediaQuery("tv and (max-height: 400px)") { ... }

Parameters:

`str` - media query to execute

Returns:

true if the browser satisfies the given media query, otherwise false

Author: Benjamin Joffe, benjoffe@opera.com

Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Fri Oct 26 12:49:37 2007