2 Polymer('core-media-query', {
5 * The Boolean return value of the media query
7 * @attribute queryMatches
14 * The CSS media query to evaulate
22 this._mqHandler = this.queryHandler.bind(this);
25 queryChanged: function() {
27 this._mq.removeListener(this._mqHandler);
29 var query = this.query;
30 if (query[0] !== '(') {
31 query = '(' + this.query + ')';
33 this._mq = window.matchMedia(query);
34 this._mq.addListener(this._mqHandler);
35 this.queryHandler(this._mq);
37 queryHandler: function(mq) {
38 this.queryMatches = mq.matches;
39 this.asyncFire('core-media-change', mq);