Skip to content

Commit

Permalink
Make MediaQueryList implement EventTarget, as per newer spec.
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174103036
  • Loading branch information
SLaks authored and brad4d committed Nov 1, 2017
1 parent 46370ad commit f91dcb4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions externs/browser/w3c_css.js
Original file line number Diff line number Diff line change
Expand Up @@ -2084,6 +2084,7 @@ Window.prototype.outerHeight;

/**
* @constructor
* @implements {EventTarget}
* @see http://www.w3.org/TR/cssom-view/#mediaquerylist
*/
function MediaQueryList() {}
Expand Down Expand Up @@ -2114,6 +2115,17 @@ MediaQueryList.prototype.addListener = function(listener) {};
*/
MediaQueryList.prototype.removeListener = function(listener) {};

/** @override Not available in some browsers; use addListener instead. */
MediaQueryList.prototype.addEventListener = function(
type, listener, opt_options) {};

/** @override Not available in old browsers; use removeListener instead. */
MediaQueryList.prototype.removeEventListener = function(
type, listener, opt_options) {};

/** @override */
MediaQueryList.prototype.dispatchEvent = function(evt) {};

/**
* @typedef {(function(!MediaQueryList) : void)}
* @see http://www.w3.org/TR/cssom-view/#mediaquerylistlistener
Expand Down
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/resources.json

Large diffs are not rendered by default.

0 comments on commit f91dcb4

Please sign in to comment.