Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

MediaQueryList

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 extends EventTarget {
readonly matches: boolean;
readonly media: string;
onchange: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null;
addEventListener<K extends keyof MediaQueryListEventMap>(
type: K,
listener: (this: MediaQueryList, ev: MediaQueryListEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void;
addListener(callback: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null): void;
removeEventListener<K extends keyof MediaQueryListEventMap>(
type: K,
listener: (this: MediaQueryList, ev: MediaQueryListEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void;
removeListener(callback: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null): void;
}
var MediaQueryList: {
prototype: MediaQueryList;
new (): MediaQueryList;
}
;

§Extends

§Properties

§
readonly matches: boolean
[src]
§
readonly media: string
[src]
§
onchange: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null
[src]

§Methods

§
addEventListener<K extends keyof MediaQueryListEventMap>(
type: K,
listener: (this: MediaQueryList, ev: MediaQueryListEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
addListener(callback: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null): void
[src]
§
removeEventListener<K extends keyof MediaQueryListEventMap>(
type: K,
listener: (this: MediaQueryList, ev: MediaQueryListEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
[src]
§
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void
[src]
§
removeListener(callback: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null): void
[src]