Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
polymer-media-query: allow compound media queries
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvonne Yip committed Oct 29, 2013
1 parent 4e2c272 commit ded4981
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion polymer-media-query/polymer-media-query.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@
if (this._mq) {
this._mq.removeListener(this._mqHandler);
}
this._mq = window.matchMedia('(' + this.query + ')');
var query = this.query;
if (query[0] !== '(') {
query = '(' + this.query + ')';
}
this._mq = window.matchMedia(query);
this._mq.addListener(this._mqHandler);
this.queryHandler(this._mq);
},
Expand Down

0 comments on commit ded4981

Please sign in to comment.