diff options
author | Moonchild <moonchild@palemoon.org> | 2020-09-23 08:24:14 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-09-23 08:29:21 +0000 |
commit | 312f0b3a767112621278c97c1f5099e37238b337 (patch) | |
tree | a9733493b61ba3c4b1fd7ee11f87d9593964e077 /dom/webidl/MediaQueryListEvent.webidl | |
parent | 04479387a21dd0bbf6006e27ec49101d1f2380a4 (diff) | |
download | UXP-312f0b3a767112621278c97c1f5099e37238b337.tar UXP-312f0b3a767112621278c97c1f5099e37238b337.tar.gz UXP-312f0b3a767112621278c97c1f5099e37238b337.tar.lz UXP-312f0b3a767112621278c97c1f5099e37238b337.tar.xz UXP-312f0b3a767112621278c97c1f5099e37238b337.zip |
Issue #1655: Update MediaQueryList to the current draft spec.
This make MediaQueryList inherit from EventTarget and adds MediaQueryListEvent
as an interface as well as the onchange() method.
This should not affect compatibility with other code; the event object is a
MediaQueryListEvent instance, which is recognized as a MediaListQuery instance.
Diffstat (limited to 'dom/webidl/MediaQueryListEvent.webidl')
-rw-r--r-- | dom/webidl/MediaQueryListEvent.webidl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/dom/webidl/MediaQueryListEvent.webidl b/dom/webidl/MediaQueryListEvent.webidl new file mode 100644 index 000000000..f3a66fb57 --- /dev/null +++ b/dom/webidl/MediaQueryListEvent.webidl @@ -0,0 +1,18 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * https://drafts.csswg.org/cssom-view/#mediaquerylistevent
+ */
+
+[Constructor(DOMString type, optional MediaQueryListEventInit eventInitDict)]
+interface MediaQueryListEvent : Event {
+ readonly attribute DOMString media;
+ readonly attribute boolean matches;
+};
+
+dictionary MediaQueryListEventInit : EventInit {
+ DOMString media = "";
+ boolean matches = false;
+};
|