MDN wants to talk to developers like you: https://qsurvey.mozilla.com/s3/8d22564490d8

Nos bénévoles n'ont pas encore traduit cet article en Français. Inscrivez-vous et aidez-nous à réaliser cette tâche !
Vous pouvez également lire cet article en English (US).

A MediaQueryList object maintains a list of media queries on a document, and handles sending notifications to listeners when the media queries on the document change.

This makes it possible to observe a document to detect when its media queries change, instead of polling the values periodically, if you need to detect changes to the values of media queries on a document.

A MediaQueryListListener is a callback function that gets invoked with a single argument, the MediaQueryList for which the evaluated result changed.

Specifications

Specification Status Comment
CSS Object Model (CSSOM) View Module
The definition of 'MediaQueryListListener' in that specification.
Working Draft Initial definition

Browser compatibility

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? (Yes) 6.0 (6.0) ? ? ?
Feature Android Edge Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? (Yes) ? ? ? ?

See also

Étiquettes et contributeurs liés au document

 Dernière mise à jour par : chrisdavidmills,