The MediaQueryListEvent constructor creates a new MediaQueryListEvent instance.


var myMqlEvent = new MediaQueryListEvent(init);



An init object that defines features of the new object instance. The available properties are:

  • media: A DOMString representing a serialized media query.
  • matches: A Boolean representing the media query status — true if it matches, false if not.


var media = '(max-width: 600px)';
var matches = true;

var myMediaQueryListEvent = new MediaQueryListEvent({media, matches});


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

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes ?55 No Yes ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support No Yes ?55 Yes ? Yes

See also

Document Tags and Contributors

Contributors to this page: fscholz, chrisdavidmills
Last updated by: fscholz,