Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Unified Diff: Source/core/css/MediaQueryList.idl

Issue 396283004: Make the MediaQueryList listener an EventListener (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/MediaQueryList.cpp ('k') | Source/core/css/MediaQueryListEvent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/MediaQueryList.idl
diff --git a/Source/core/css/MediaQueryList.idl b/Source/core/css/MediaQueryList.idl
index 7b8b77b0ee4a42608ba280df9e1f45e12c5e4250..cb93f6f8b325533ce01ca96b29b05829b6b9420c 100644
--- a/Source/core/css/MediaQueryList.idl
+++ b/Source/core/css/MediaQueryList.idl
@@ -16,13 +16,22 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+
+// http://dev.w3.org/csswg/cssom-view/#mediaquerylist
[
ActiveDOMObject,
NoInterfaceObject,
WillBeGarbageCollected
-] interface MediaQueryList {
+] interface MediaQueryList : EventTarget {
readonly attribute DOMString media;
readonly attribute boolean matches;
- void addListener([Default=Undefined] optional MediaQueryListListener listener);
- void removeListener([Default=Undefined] optional MediaQueryListListener listener);
+
+ // Even though this interface is now an event target, these functions
+ // exist as aliases for addEventListener for backwards compatibility
+ // with older versions of this interface. See the note at
+ // http://dev.w3.org/csswg/cssom-view/#dom-mediaquerylist-removelistener
+ [ImplementedAs=addDeprecatedListener] void addListener([Default=Undefined] optional EventListener listener);
+ [ImplementedAs=removeDeprecatedListener]void removeListener([Default=Undefined] optional EventListener listener);
+
+ attribute EventHandler onchange;
};
« no previous file with comments | « Source/core/css/MediaQueryList.cpp ('k') | Source/core/css/MediaQueryListEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698