MediaQueryList
A MediaQueryList object stores information on a media query applied to a document, with support for both immediate and event-driven matching against the state of the document.
Value members
Concrete methods
A boolean value that returns true if the document currently matches the media query list, or false if not.
A boolean value that returns true if the document currently matches the media query list, or false if not.
Deprecated methods
Adds to the MediaQueryList a callback which is invoked whenever the media query status—whether or not the document matches the media queries in the list—changes.
Adds to the MediaQueryList a callback which is invoked whenever the media query status—whether or not the document matches the media queries in the list—changes.
This method exists primarily for backward compatibility; if possible, you should instead use addEventListener() to watch for the change event.
- Deprecated
Removes the specified listener callback from the callbacks to be invoked when the MediaQueryList changes media query status, which happens any time the document switches between matching and not matching the media queries listed in the MediaQueryList.
Removes the specified listener callback from the callbacks to be invoked when the MediaQueryList changes media query status, which happens any time the document switches between matching and not matching the media queries listed in the MediaQueryList.
This method has been kept for backward compatibility; if possible, you should generally use removeEventListener() to remove change notification callbacks (which should have previously been added using addEventListener()).
- Deprecated
Inherited methods
The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on. The event target may be an Element in a document, the Document itself, a Window, or any other object that supports events (such as XMLHttpRequest).
The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on. The event target may be an Element in a document, the Document itself, a Window, or any other object that supports events (such as XMLHttpRequest).
This implementation accepts a settings object of type EventListenerOptions.
- Inherited from:
- EventTarget
The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on. The event target may be an Element in a document, the Document itself, a Window, or any other object that supports events (such as XMLHttpRequest).
The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on. The event target may be an Element in a document, the Document itself, a Window, or any other object that supports events (such as XMLHttpRequest).
- Inherited from:
- EventTarget
Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) apply to events dispatched manually with dispatchEvent().
Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) apply to events dispatched manually with dispatchEvent().
- Inherited from:
- EventTarget
Removes the event listener previously registered with EventTarget.addEventListener.
Removes the event listener previously registered with EventTarget.addEventListener.
This implementation accepts a settings object of type EventListenerOptions.
- Inherited from:
- EventTarget
Removes the event listener previously registered with EventTarget.addEventListener.
Removes the event listener previously registered with EventTarget.addEventListener.
- Inherited from:
- EventTarget