A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/MediaQueryListEvent/MediaQueryListEvent below:

MediaQueryListEvent: MediaQueryListEvent() constructor - Web APIs

MediaQueryListEvent: MediaQueryListEvent() constructor

Baseline Widely available

The MediaQueryListEvent() constructor creates a new MediaQueryListEvent object.

Syntax
new MediaQueryListEvent(type)
new MediaQueryListEvent(type, options)
Parameters
type

A string with the name of the event. It is case-sensitive and browsers always set it to change.

options Optional

An object that, in addition of the properties defined in Event(), can have the following properties:

media Optional

A string representing a serialized media query. It defaults to "".

matches Optional

A boolean value representing the media query status; true if it matches, false if not. It defaults to false.

Return value

A new MediaQueryListEvent object.

Examples
const media = "(width <= 600px)";
const matches = true;

const myMediaQueryListEvent = new MediaQueryListEvent("change", {
  media,
  matches,
});
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4