Stores information on a media query applied to a document, and handles sending notifications to listeners when the media query state change (i.e. when the media query test starts or stops evaluating to true).

interface MediaQueryList {
    matches: boolean;
    media: string;
    onchange: null | ((this, ev) => any);
    addEventListener<K>(type, listener, options?): void;
    addEventListener(type, listener, options?): void;
    addListener(callback): void;
    dispatchEvent(event): boolean;
    removeEventListener<K>(type, listener, options?): void;
    removeEventListener(type, listener, options?): void;
    removeListener(callback): void;
}

Hierarchy

  • EventTarget
    • MediaQueryList

Properties

matches: boolean
media: string
onchange: null | ((this, ev) => any)

Type declaration

Methods

  • Type Parameters

    • K extends "change"

    Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • callback: null | ((this, ev) => any)

    Returns void

    Deprecated

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    Parameters

    • event: Event

    Returns boolean

  • Type Parameters

    • K extends "change"

    Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • callback: null | ((this, ev) => any)

    Returns void

    Deprecated

Generated using TypeDoc